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

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

From: Elliott Sprehn <esprehn@gmail.com>
Date: Tue, 12 Jun 2012 13:09:59 -0700
Message-ID: <CAPJYB1iqLHcT8zFk8Cs=MHnOOgoxvWG9ssQz8uiP8UQYJCssOg@mail.gmail.com>
To: Ryosuke Niwa <rniwa@webkit.org>
Cc: www-dom <www-dom@w3.org>, Ojan Vafai <ojan@chromium.org>, Boris Zbarsky <bzbarsky@mit.edu>
Good question, I assume you mean new
XMLSerializer().serializeToString(document)?

FF: Correct order because it forces it on you.
Webkit: Doctype printed out of order.
IE9: Doctype always printed in order.
Opera: Doesn't ever print the doctype. But is the only one to print the XML
prolog.

IE9's behavior seems the most sane here since it makes sure the
serialization is valid in the face of developer error similar to
serializing the parsed result of <b><a></b></a>.

On Tue, Jun 12, 2012 at 12:45 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:

> Did you test how they serialize the resultant DOM?
> On Jun 12, 2012 12:38 PM, "Elliott Sprehn" <esprehn@gmail.com> wrote:
>
>> I just tested this:
>>
>> IE8: No doctype node, comment node instead so doesn't apply.
>> IE9, Webkit, Opera: Order doesn't matter, no effect on document mode.
>> FF: Mismatched order throws, no effect on document mode.
>>
>> I don't have IE10.
>>
>> So it's only Firefox that imposes this restriction right now. If the goal
>> is consistency between the browsers I'd advocate we should remove the
>> exception from Firefox since it's the "path of least resistance" to get
>> there.
>>
>> On Tue, Jun 12, 2012 at 12:17 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>
>>> On 6/12/12 2:37 PM, Ojan Vafai wrote:
>>>
>>>> Your reply didn't come through and I couldn't find it on the www-dom or
>>>> public-webapps archives. All I saw was Elliott's response. Mind sending
>>>> it again?
>>>>
>>>
>>> http://lists.w3.org/Archives/**Public/www-dom/2012AprJun/**0106.html<http://lists.w3.org/Archives/Public/www-dom/2012AprJun/0106.html>
>>>
>>> -Boris
>>>
>>
>>
Received on Tuesday, 12 June 2012 20:10:48 GMT

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