> Is it sufficient to know when a particular element gets upgraded?
yes, but from the outside, not from within the class or it's still unobservable.
> Or do you want to observe all elements that get upgraded to some custom element?
I want to know, if a node is a custom element, when it will get upgraded.
> is it sufficient to, let's say have a variant of whenDefined(element) which takes an element and resolves a promise when the element gets upgraded,
That would be just perfect. The simplest, the better.
In this case, my only concern is what happens if a node is not a custom element.
If the node is not an `HTMLUnknownElement` and the promise is resolved right away, let's say in cases such `whenDefined(document.documentElement)`, then I'm more than OK with this proposal/solution.
It solves from the inside, it solves from the outside, everybody wins.
--
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/671#issuecomment-333054302