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

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 UTC