This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The "created" callback is invoked _after_ we traversed through CHAIN. This is the callback to use to do stuff your particular element instance.
*** Bug 18731 has been marked as a duplicate of this bug. ***
One concern raised: the "created" callback effectively acts as a constructor, and this mechanism alone does not provide a way to invoke the "created" callback of the super-class.
One idea: pass the prototype's super created method: created: function(superCreated) { }
http://dvcs.w3.org/hg/webcomponents/rev/cad29a7d9a11
For the work my team is doing, 'create' is a critical entry-point (initialization after all shadow roots are created), but it turns out we also could use an entry-point *before* the shadow roots are created. A strawman API: // called on the ultimate subclass // when the element in instantiated // but BEFORE any shadowRootCreated. // inSuper argument provided to call inherited 'created' // which is otherwise private created: function(inSuper) // called on each extendor, from oldest to youngest, // when it's respective shadow root is intantiated // inRoot argument provides reference to the shadow root // which MAY otherwise be private shadowRootCreated: function(inRoot) // called on the ultimate subclass // when the element in instantiated // and AFTER all shadowRootCreated. // inSuper argument provided to call inherited 'created' // which is otherwise private ready: function(inSuper) Unfortunately increases complexity, but I suggest we need to service these custom inheritance trees properly.
The comment above overlaps with this bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=18748. Maybe I should have made a new bug altogether?
*** Bug 21408 has been marked as a duplicate of this bug. ***
*** Bug 21409 has been marked as a duplicate of this bug. ***
https://dvcs.w3.org/hg/webcomponents/rev/50480689d0bf
https://dvcs.w3.org/hg/webcomponents/rev/d0d9310e750a https://dvcs.w3.org/hg/webcomponents/rev/0854a1983551 https://dvcs.w3.org/hg/webcomponents/rev/b37a366e3682 I think this is done now. Please look over the spec and make sure I didn't booger it up too much.