polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

[Custom Elements] `instanceof Function` doesn't work for functions from other realms.

Open klarkc opened this issue 8 years ago • 11 comments

Hello, I am having some troubles with jsdom. I found this bug tmpvar/jsdom#1737 that is related to this piece of code: https://github.com/webcomponents/custom-elements/blob/master/src/CustomElementRegistry.js#L64

It seems that lot of sandboxing by jsdom is necessary to emulate the instanceof behavior.

This check is related to the specs? Every custom element class should really be instanceof Function?

klarkc avatar Feb 16 '17 18:02 klarkc