This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 1535 [details] Testcase Consider this testcase: <iframe></iframe> <script> var f = document.registerElement.call(frames[0].document, "x-foo"); </script> Per the spec, this should "let PROTOTYPE be the result of invoking Object.create with HTMLElement's interface prototype object as only argument". But it doesn't say _which_ "HTMLElement's interface prototype object" should be used. Then the spec says to run the "custom element constructor generation algorithm", but this algorithm assumes an ambient global, which the spec doesn't define. In practice, the Chrome and Firefox implementations differ, as the attached testcase shows. The output in Chrome: ctor instanceof iframe Function: false ctor instanceof parent Function: true proto comes from iframe: false proto comes from parent: true The output in Firefox: ctor instanceof iframe Function: true ctor instanceof parent Function: false proto comes from iframe: true proto comes from parent: false I believe the Firefox behavior is more correct here, by the way, since we're supposed to be using the registry of the iframe document, so should use its prototypes and constructors.
Oh, and also, the "definition construction algorithm" is making assumptions about which global's prototypes or interfaces are supposed to be used. This part is also not interoperable in Chrome and Firefox: Firefox seems to require that the passed-in proto come from the same global as the document involved, as you can see in the testcase.
Moved to https://github.com/w3c/webcomponents/issues/185