Re: [w3c/webcomponents] Move the check for HTMLElement and its subclass from customElements.define to construction timing (#541)

> You don't because you can just check that you're constructing yourself during the construction.

Ah, great, that makes sense! OK, I can change this then...

> Also, I'm not sure how your check works against Proxy objects.

I think the `new.target` would still be the original constructor (when the proxy delegates construction). So it would still fail. But I guess we don't need to worry about it any more.

> +1 to @rniwa, turns out that the current Blink impl skips this check.

I hope someone is writing web platform tests for this!! (And the Proxy case is a good one too.) I thought I even saw some from Firefox land in WPT...

-- 
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#issuecomment-239830620

Received on Monday, 15 August 2016 15:21:06 UTC