Re: Custom Elements: insert/remove callbacks

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 arguments.  I just 
described the conceptual information that one can typically get based on 
what all those arguments are.  It also happens that in Gecko the 
Bind/Unbind functions aren't pure notification; they are also 
responsible for doing things like setting the parent pointer as needed.

But yes, the upshot is that the two cases are pretty similar.  Gecko 
doesn't have on hand the exact node that the insertion/removal happened 
at, but adding that would not be a big deal.

-Boris

Received on Friday, 8 May 2015 12:51:48 UTC