Skip to content

Support injecting Blockly into shadowDom #1114

@bamartin-ua

Description

@bamartin-ua

So I'm trying to put blockly in a webcomponent, and I'm getting Uncaught Error: container is not in current document. Looking at the source code, this appears to be a deliberate line in Blockly.inject() that checks to make sure you're not using shadow-dom.

// Verify that the container is in document.
if (!goog.dom.contains(document, container)) {
  throw 'Error: container is not in current document.';
}

what's the reason for this? is there some principled reason we shouldn't be using blockly in a webcomponent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalExternal contributions not acceptedissue: feature requestDescribes a new feature and why it should be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions