editor.js can't fire unregisterBlockStyle

Hi,

the new editor.js injection doesn’t allow to do block style unregistration.
I tested adding this code below in editor.js but it never fired.
Distinct script loaded with the hook enqueue_block_editor_assets play well (but quite strange this enqueue generate a js error inside the editor.js which import a js file doing a createHigherOrderComponent)

Thank you

domReady(() => {

const unregisterStyledBlocks = \[{blockName: 'core/button', styleName: 'outline'}\];

unregisterStyledBlocks.forEach(block => {

wp.blocks.unregisterBlockStyle(block.blockName, block.styleName);

});

});

Known bug with wp.domReady:

From the replies:

Calling it using window.onload works