Re: Custom Elements: insert/remove callbacks

2015-05-09 Thread Boris Zbarsky
On 5/9/15 12:40 PM, Anne van Kesteren wrote: So that seems clearly wrong (in the specification)... Are descendants notified in tree order? In Gecko, yes. Note that running script during these insert/remove notifications is not OK, so anything that needs to run script has to do it later (for

Re: Custom Elements: insert/remove callbacks

2015-05-09 Thread Anne van Kesteren
On Fri, May 8, 2015 at 2:50 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 5/8/15 1:42 AM, Elliott Sprehn wrote: That actually seems pretty similar to what we have, ours is in the form of: Node#insertedInto(Node insertionPoint) Node#removedFrom(Node insertionPoint) To be clear, ours is also

Re: Custom Elements: insert/remove callbacks

2015-05-09 Thread Elliott Sprehn
On May 9, 2015 9:41 AM, Anne van Kesteren ann...@annevk.nl wrote: On Fri, May 8, 2015 at 2:50 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 5/8/15 1:42 AM, Elliott Sprehn wrote: That actually seems pretty similar to what we have, ours is in the form of: Node#insertedInto(Node

Re: Custom Elements: insert/remove callbacks

2015-05-08 Thread Adam Klein
On Thu, May 7, 2015 at 10:56 PM, Elliott Sprehn espr...@chromium.org wrote: On Thu, May 7, 2015 at 10:44 PM, Anne van Kesteren ann...@annevk.nl wrote: On Fri, May 8, 2015 at 7:42 AM, Elliott Sprehn espr...@chromium.org wrote: That actually seems pretty similar to what we have, ours is in

Re: Custom Elements: insert/remove callbacks

2015-05-08 Thread Boris Zbarsky
On 5/8/15 1:42 AM, Elliott Sprehn wrote: That actually seems pretty similar to what we have, ours is in the form of: Node#insertedInto(Node insertionPoint) Node#removedFrom(Node insertionPoint) To be clear, ours is also in the form of two methods (BindToTree/UnbindFromTree) that take various

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Dominic Cooney
On Thu, May 7, 2015 at 4:43 PM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, May 6, 2015 at 11:01 PM, Justin Fagnani justinfagn...@google.com wrote: How are you supposed to tell if one of your ancestors was removed? Is that a hook builtin elements have today? Blink's built-in

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Anne van Kesteren
On Wed, May 6, 2015 at 11:01 PM, Justin Fagnani justinfagn...@google.com wrote: How are you supposed to tell if one of your ancestors was removed? Is that a hook builtin elements have today? -- https://annevankesteren.nl/

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Boris Zbarsky
On 5/7/15 3:43 AM, Anne van Kesteren wrote: On Wed, May 6, 2015 at 11:01 PM, Justin Fagnani justinfagn...@google.com wrote: How are you supposed to tell if one of your ancestors was removed? Is that a hook builtin elements have today? In Gecko, yes. The set of hooks Gecko builtin elements

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Elliott Sprehn
On Thu, May 7, 2015 at 10:44 PM, Anne van Kesteren ann...@annevk.nl wrote: On Fri, May 8, 2015 at 7:42 AM, Elliott Sprehn espr...@chromium.org wrote: That actually seems pretty similar to what we have, ours is in the form of: Node#insertedInto(Node insertionPoint) Node#removedFrom(Node

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Anne van Kesteren
On Fri, May 8, 2015 at 7:42 AM, Elliott Sprehn espr...@chromium.org wrote: That actually seems pretty similar to what we have, ours is in the form of: Node#insertedInto(Node insertionPoint) Node#removedFrom(Node insertionPoint) where insertionPoint is the ancestor in the tree where a

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Elliott Sprehn
On Thu, May 7, 2015 at 10:24 PM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, May 7, 2015 at 10:14 PM, Boris Zbarsky bzbar...@mit.edu wrote: In Gecko, yes. The set of hooks Gecko builtin elements have today is, effectively: 1) This element used to not have a parent and now does.

Re: Custom Elements: insert/remove callbacks

2015-05-07 Thread Anne van Kesteren
On Thu, May 7, 2015 at 10:14 PM, Boris Zbarsky bzbar...@mit.edu wrote: In Gecko, yes. The set of hooks Gecko builtin elements have today is, effectively: 1) This element used to not have a parent and now does. 2) This element has an ancestor that used to not have a parent and now

Custom Elements: insert/remove callbacks

2015-05-06 Thread Anne van Kesteren
Open issues are kept track of here: https://wiki.whatwg.org/wiki/Custom_Elements This has come up before, but it came up again at the Extensible Web Summit so raising hopefully for the last time. The DOM has insert/remove primitives for nodes. Custom Elements uses insertion into a document

Re: Custom Elements: insert/remove callbacks

2015-05-06 Thread Dimitri Glazkov
On Wed, May 6, 2015 at 6:45 AM, Anne van Kesteren ann...@annevk.nl wrote: Open issues are kept track of here: https://wiki.whatwg.org/wiki/Custom_Elements This has come up before, but it came up again at the Extensible Web Summit so raising hopefully for the last time. The DOM has

Re: Custom Elements: insert/remove callbacks

2015-05-06 Thread Justin Fagnani
On Wed, May 6, 2015 at 8:25 AM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, May 6, 2015 at 4:34 PM, Dimitri Glazkov dglaz...@google.com wrote: This is https://www.w3.org/Bugs/Public/show_bug.cgi?id=24866. The way I remember it, the argument went like this: the most common use case

Re: Custom Elements: insert/remove callbacks

2015-05-06 Thread Anne van Kesteren
On Wed, May 6, 2015 at 4:34 PM, Dimitri Glazkov dglaz...@google.com wrote: This is https://www.w3.org/Bugs/Public/show_bug.cgi?id=24866. The way I remember it, the argument went like this: the most common use case for this callback is to react to element becoming part of the main document