webcomponents / webcomponents/polyfills
[Custom Elements] `instanceof Function` doesn't work for functions from other realms.
Open
Package: custom-elements
Severity: Medium
Type: Bug
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
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?
Contributor guide
Assessment
This issue has not been assessed yet.