[w3c/webcomponents] Should :defined match <x-foo> in browsing-context-less documents? (#540)

Originally https://bugs.chromium.org/p/chromium/issues/detail?id=635402

In documents without a browsing context, the whole custom elements machinery is offline. So `<x-foo>` is equivalent to `<asdf>`: both are never going to become customized. They are just simple unknown elements.

Currently step 7.3 of ["create an element"](https://dom.spec.whatwg.org/#concept-create-element) recognizes this and does not mark `<x-foo>` as "undefined". So in such documents, `:defined` will match `<x-foo>`, even though in the main document with a browsing context, `:defined` will not match `<x-foo>`.

Probably nobody will encounter this in practice.

I think the spec makes sense as-is. But the consequences are a bit unintuitive. So if anyone has opinions on this let me know and we can certainly change the spec.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/540

Received on Wednesday, 10 August 2016 18:32:58 UTC