Re: [w3c/webcomponents] @trusktr you're not returning the right object from the constructor. You're creating an HTMLElement, then implicitly returning MyEl, which is not an HTMLElement. Regardless of setting the prototype and what `instanceof` says, it doesn't wrap a native element object like HTMLElement does. (#766)

@IbrahimTanyalcin the title of this issue is incredibly long and not clear...

If you're asking about ES5 subclassing patterns, setting or not setting the prototype of the constructor to its super constructor has exactly the same effect with custom elements as it does for any other subclass - statics aren't inherited. Since `Element` and `HTMLElement` don't add anything to `Node`s static interface, and the one's on `Node` are generally used as direct references off of `Node`, this probably won't have much of a noticeable effect. It is correct and what a compiler would output though.

-- 
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/766#issuecomment-427999211

Received on Monday, 8 October 2018 22:28:38 UTC