Re: [w3c/webcomponents] Non-class based example of customElement.define() (#587)

> I don't think so, because I'm implicitly returning this which has the correct prototype (el) in it.

Okay. In your code, `el` != `this` so that's the problem. You can't return `this`. It's a different object from `el`. Because you're not using class constructor. `this` doesn't automatically get set to the result of calling `super` constructor (you're not even using `super` syntax so there's no way for the engine to figure this out).

-- 
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/587#issuecomment-381698633

Received on Monday, 16 April 2018 18:13:14 UTC