Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container error thrown when using shadow DOM #279

Open
mgaughan opened this issue Jul 14, 2016 · 2 comments
Open

Container error thrown when using shadow DOM #279

mgaughan opened this issue Jul 14, 2016 · 2 comments
Labels

Comments

@mgaughan
Copy link

Trying to use F2 within the shadow DOM but an error is thrown by container.js when checking that the root has been added to the page.

App root for ' + appId + ' was not appended to the DOM. Check your AppHandler callbacks to ensure you have rendered the app root to the DOM.')

The code is checking that the root has a parent node that is the document. In order to allow an F2 app to be used in the shadow DOM, this check should include if there is a parent node in the shadow DOM.

@qrider
Copy link
Contributor

qrider commented Sep 13, 2016

@mgaughan, Do you have an example? I am assuming you are talking about thecheck in elementInDocument.

I think we could use something like this to detect if it is in the ShadowDOM
if(parent.toString() === "[object ShadowRoot]") {
return true;
}

from http://stackoverflow.com/questions/27453617/how-can-i-tell-if-an-element-is-in-a-shadow-dom

@mgaughan
Copy link
Author

@qrider - correct, that's the code I've been using locally. I have forked and made the change - just need to add a unit test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants