Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

IE11 Unable to get property 'replaceChild' of undefined or null reference #518

Closed
JakobJingleheimer opened this issue Apr 7, 2016 · 5 comments
Assignees

Comments

@JakobJingleheimer
Copy link

v0.7.21 causes the following exception to be thrown in IE11:

SCRIPT5007: Unable to get property 'replaceChild' of undefined or null reference
File: webcomponents-lite.js, Line: 1037, Column: 9

The debugger says that t is [object HTMLUnknownElement]. I've been able to determine which custom element it's supposed to be based on classList. This seems to happen only for custom elements which extend native ones (but does not happen for all custom elements extending native ones). Ex my-bar and my-foo extend a, but only my-bar triggers this exception (my-bar always does and my-foo never does). Possibly a red-herring, but alphabetical order seems to matter (possibly due to our build process, which runs in alphabetical order, so my-bar would be included before my-foo).

v0.7.20 causes some Hierarchy error. v0.7.19 appears to be the last stable version.

Unfortunately, IE crashes when I try to create a jsbin for this.

@kevinpschaaf
Copy link
Contributor

The root cause of the error looks to be the addition of a patch to document.importNode in the Template polyfill that happens before a separate patch of document.importNode that was added to specifically work around broken document fragments in IE (resulting in top-level children having no parentNode). Due to ordering, the new Template polyfill importNode runs before the nodes in the doc fragment are fixed.

Since the importNode that fixes IE doc frags is in the CE polyfill but is actually unrelated to Custom Elements, we should just move that code to an earlier spot in the bundle.

@jasonhjohnson
Copy link

Hi. Was there a workaround for this?

@kito99
Copy link

kito99 commented Jan 9, 2017

Any progress on this? It sounds like a relatively simple fix...

@Torniojaws
Copy link

Still not working in IE11. Works in other browsers.

@artem-v-shamsutdinov
Copy link

artem-v-shamsutdinov commented Aug 24, 2017

Yep, still broken.

Using https://github.com/hotforfeature/origami/ to integrate Angular with Polymer in IE11.

UPDATE

Figured it out - zone.js@0.8.13 breaks it, webcomponentsjs is fine

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

No branches or pull requests

7 participants