- From: Ryosuke Niwa <notifications@github.com>
- Date: Thu, 11 Oct 2018 21:54:46 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 12 October 2018 04:55:08 UTC
@domenic : for `createdCallback`, I'd add another con that invoking the subclass' method while executing `super()` in that subclass' constructor is a very strange programming pattern. ```js class MyElement { constructor() { super(); // This calls createdCallback this._myStateObject = ~; } createdCallback(elementInternal) { // Can't see this. _myStateObject. } } ``` We have to do this for the same reason that we can't tell the end of the constructor. An alternative is to enqueue a custom element reaction after the constructor had run but then it would mean that the constructor won't have access to `ElementInternal` even though that's the most natural place to set the default tab index, etc... -- 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-429203989
Received on Friday, 12 October 2018 04:55:08 UTC