-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can't dynamically import an element definition in Canary #477
Comments
https://code.google.com/p/chromium/issues/detail?id=365956 On Tue, Apr 22, 2014 at 8:59 PM, Jan Miksovsky notifications@github.comwrote:
|
@sjmiles Thank you so much for the fast reply! This bug sank 6 hours of my day, but at least I now I have confirmation it's real and being worked on. |
Sorry about that, this caught us by surprise too. On Tue, Apr 22, 2014 at 10:02 PM, Jan Miksovsky notifications@github.comwrote:
|
I want to dynamically import an element definition and then use the imported definition to create or upgrade elements. Generally speaking, dynamic HTML imports do work (per threads like http://stackoverflow.com/questions/21607663/dynamically-load-web-components-html-imports and https://groups.google.com/forum/#!searchin/polymer-dev/dynamic/polymer-dev/uarVrxBK7XU/kzzXo2pFPTYJ). However, I can't seem to get this working when importing a
<polymer-element>
definition.See http://jsbin.com/lopaf/6/edit, which wants to load the element contents at http://jsbin.com/vovun/2/edit.
As noted, it doesn't appear possible to actually demonstrate HTML imports in a jsbin because of CORS restrictions in the iframe arrangement jsbin uses, but even if these files are saved locally, the result doesn't work in Canary 36.0.1952.0.
The static import version does work, so it appears to be an issue with adding the HTML Import dynamically. The dynamic import does take place — the imported files and any dependencies appear in the debugger's Network tab, among other things — but the definition never gets applied to the page.
If I use production Chrome 34.0.1847.116, the dynamic import works. This suggests that it could be a problem with native HTML Imports, but given that the content appears to be successfully imported, I was wondering if this was a Polymer bug. If this appears to be a Chrome bug, please let me know and I'll file it there.
The text was updated successfully, but these errors were encountered: