webcomponents / webcomponents/polyfills

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

Open
#105 11 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.