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 the form
>> of:
>> >
>> > Node#insertedInto(Node insertionPoint)
>> > Node#removedFrom(Node insertionPoint)
>> >
>> > where insertionPoint is the ancestor in the tree where a connection was
>> > added or removed which may be arbitrarily far up the ancestor chain.
>> From
>> > that you can figure out all the cases Boris is describing.
>>
>> Cool. So maybe the DOM specification needs to be updated to have that
>> model and we should expose that as low-level hook to web developers.
>>
>
> We'd consider adding a new MutationObserver type, we'd prefer not to add
> any more tree mutation callbacks. Anything you can do with those you can do
> with an ancestorChanged record type and takeRecords().
>

We should think hard before adding ancestor information to
MutationObservers; like other DOM-tree-related APIs, they are very much
based around the model of information coming up the tree from below (you
can imagine how odd it would be to add event dispatch that flowed down the
tree towards the leaves).

- Adam

Reply via email to