- From: TAMURA, Kent <notifications@github.com>
- Date: Wed, 10 Oct 2018 21:33:00 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 11 October 2018 04:33:23 UTC
I talked to JavaScript-binding experts in the team, and our conclusion was it's very difficult to detect whether an operation is inside ```new MyElement()``` or not. Also, I noticed it's difficult to define ```createdCallback``` behavior in ```new MyElement()``` case. I think the second approach (```new ElementInternals(this)```, ```this.attachInternals()```, ```customElements.createInternals(this)```, or something) is acceptable though it's impossible to prevent non-ce-authors from using it perfectly. We may clear can-create-internals-flag in [create-an-element](https://dom.spec.whatwg.org/#concept-create-element) path and [upgrade-an-element](https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element) path, and may clear it when the 'custom'-state element is connected. -- 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/758#issuecomment-428817453
Received on Thursday, 11 October 2018 04:33:23 UTC