- From: Ryosuke Niwa <notifications@github.com>
- Date: Wed, 10 Aug 2016 19:58:59 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Thursday, 11 August 2016 02:59:30 UTC
Right now, [`CustomElementsRegistry.define`](https://html.spec.whatwg.org/#dom-customelementsregistry-define) is spec'ed to check whether the interface object inherits from `HTMLElement` interface or not. This check is hard to implement in WebKit as is because we don't have a mechanism to check the inheritance hierarchy of interface constructor objects (we can check the inheritance hierarchy of constructed objects via branding). It's also weird to specifically filter out `HTMLElement` and their sub-interfaces when we throw the same error for things like `Range`, `Text`, and `Set`. My preference would be moving this check to the construction time. We can check that `new.target` is not `HTMLElement` or one of its subclasses instead. -- 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/541
Received on Thursday, 11 August 2016 02:59:30 UTC