-
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
IE still needs full webcomponents.js (non lite) in this edge case #2114
Comments
The standalone Template polyfill used in wcjs-lite does not currently support In the meantime, I've added code to your We also noticed you needed to call |
Ok, big thanks for the workaround code, it works nicely. |
Closing, as webcomponents/webcomponentsjs#355 has been resolved (added |
thanks, it works perfectly! |
@kevinpschaaf just to let you know that the Don't know if it's a Polymer bug or webcomponents bug. I tried both versions, the "good" for latest webcomponentsjs and the "meantime" for the old 0.7.2, but none of them work in IE11. BUT: I switched to a simpler function createDomModule(proto) {
var domModule = document.createElement('dom-module');
domModule.id = proto.is;
var html = "";
if (proto.style !== undefined) html += `<style>${proto.style}</style>`;
if (proto.template !== undefined) html += `<template>${proto.template}</template>`;
domModule.innerHTML = html;
(domModule as any).createdCallback();
} and it works perfectly in all browsers and all webcomponents versions (0.7.2 and 0.7.10), so I'm using it for my project (PolymerTS). Just wanted to let you know, thank you for your kind help. |
Thanks for the follow-up! This pointed out a problem with the |
A custom element created by code (manually creating
<dom-module>
and injecting template) results in an empty element in IE 11.But if I switch from
webcomponents-lite.js
towebcomponents.js
it starts to work normally like in Chrome or Firefox.Any idea why this happens? Is it a webcomponents bug?
I wouldn't like include the full WebComponents just for this reason.
The dom-module creation code is:
As said before, the above code works normally in Chrome and FF, but not IE.
The text was updated successfully, but these errors were encountered: