W3C home > Mailing lists > Public > public-html@w3.org > December 2008

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 02 Dec 2008 20:45:07 -0500
Message-ID: <4935E4A3.8000803@mit.edu>
To: Ian Hickson <ian@hixie.ch>, HTML WG <public-html@w3.org>

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.

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

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:40 UTC