Re: Black-box equivalence of parsing fragments directly into context node

Ian Hickson wrote:
> On Tue, 2 Dec 2008, Boris Zbarsky wrote:
>> For the others, conceptually treating the mutations as equivalent to a 
>> DocumentFragment containing the nodes being inserted at the relevant 
>> place would make sense to me, personally.
> 
> How about the removals?

Presumably treated like any other removal of all the kids.  What does 
setting textContent do, say?  In fact, in Gecko the removal is just a 
SetTextContent("") call, more or less.

> What mutation events get fired for DocumentFragment insertions, and which 
> spec requires those firings?

I'm not sure anything actually defines that explicitly, actually.  Gotta 
love those orthogonal specifications.  ;)

The language in DOM2 Core talks about a DocumentFragment insertion 
inserting all the kids of the DocumentFragment instead, but it's not 
obvious where they should be inserted if mutation events are mutating 
the tree in parallel.  It does seem like the behavior here should just 
be consistent with DocumentFragment behavior, whatever that is.

> Should this be sync or async?

Whatever mutation events normally are.

I do realize that current mutation event interop is crappy, but I hope 
that the ongoing webapi work will fix that, and it would be nice if this 
operation were simply and clearly defined in terms of others that webapi 
will define in turn.  In this case, it seems worth it to leverage the 
webapi work instead of trying to redo it.

-Boris

Received on Wednesday, 3 December 2008 01:51:42 UTC