My Vue app did set up a Blockly element in mounted
. I'm updating the app by using Lit. In connectedCallback
the target element which hosts Blockly is not contained in the document.
connectedCallback(): void {
super.connectedCallback()
const editorDiv = this.renderRoot.querySelector('#visual-editor-div')
Blockly.inject(editorDiv)
}
render() {
return html`
<div id="visual-editor-div"></div>
`
}
Error message was:
Error: container is not in current document.
Is there the way to inject Blockly after container mounted in Lit?