Re: [w3c/webcomponents] Is there a way to detect if a custom element was constructed during parsing? (#789)

> `this.isConnected` and `this.parentNode` seems to be enough signal for elements created from parsing a fragment, e.g., run this in the console
That is true of any element which got upgraded.

In general there is no way to know whether a given element is created by the parser or not. The only thing you can observe is whether an element got upgraded by getting inserted into a document or constructed synchronously.

I don't quite understand what the use case for such a detection is, however.

-- 
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/789#issuecomment-459566470

Received on Friday, 1 February 2019 01:01:28 UTC