- From: Darien Maillet Valentine <notifications@github.com>
- Date: Thu, 20 Aug 2020 17:17:16 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 21 August 2020 00:17:28 UTC
@rniwa I see that, like you said, the custom element state isn’t set to "custom" till upgrade here. Using that as the test does appear to prevent `someElement.attachInternals()`. But it looks like it would prevent attaching in the constructor, too. In [Upgrade an element](https://html.spec.whatwg.org/multipage/custom-elements.html#upgrades), the state is set to “failed” at step 3 (weird, but the note explains it takes care of an early exit for reentrancy). At step 6 the constructor is added to the stack and at step 8, the constructor runs. It isn’t till step 10, though, that — provided everything went swell — it changes from “failed” to “custom”. I think that `custom element state` doesn’t (currently) align with the point where attachment should become available (unless I’m missing something). The gist makes sense to me but maybe a distinct flag would be needed? -- 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/871#issuecomment-677968439
Received on Friday, 21 August 2020 00:17:28 UTC