W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2012

Re: [DOM4] Mutation algorithm imposed order on document children

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 12 Jun 2012 14:30:56 -0400
Message-ID: <4FD78AE0.5070907@mit.edu>
To: Elliott Sprehn <esprehn@gmail.com>
CC: www-dom <www-dom@w3.org>
On 6/12/12 1:48 PM, Elliott Sprehn wrote:
> Inserting doctype nodes has no effect on the mode of the document
> though, so it's already possible to produce a broken serialization (one
> in the wrong mode). For instance you can remove the doctype node and
> then serialize or swap the doctype node and then serialize.

Sure.  The question is whether the common-case behavior should be sane.

> In practice I don't think anyone inserts these in the wrong order

Well, since some current UAs do throw in this situation, I'm pretty sure 
you're right about that.

> (or insert doctypes at all since they have no effect).

The most likely way a doctype would be inserted is if some script is 
blindly doing node processing on existing nodes without worrying about 
their types.

-Boris
Received on Tuesday, 12 June 2012 18:31:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT