W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2010

[whatwg] Serialization of boolean content attributes

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 18 Jun 2010 11:01:48 -0700
Message-ID: <AANLkTimKD7EJ-veDmjqREacJFiuVqMdMW3sSy1MlpmoX@mail.gmail.com>
On Fri, Jun 18, 2010 at 10:56 AM, Alexey Proskuryakov <ap at webkit.org> wrote:
>
> 18.06.2010, ? 10:25, Jonas Sicking ???????(?):
>
>> Serializing boolean attributes as <option selected="selected"> seems
>> like a very bad idea since that means that you're changing the value
>> as you serialize. I.e. if you roundtrip by for example setting:
>>
>> myDivElement.innerHTML = myDivElement.innerHTML
>>
>> you've change the value of all boolean attribute.
>
>
> That's what Firefox is doing now, and has presumably been doing for a long
> time, so maybe it isn't such a bad idea. It's compatible with the Web and
> with HTML4.

Just because Firefox does it doesn't mean it's a good idea ;)

The fact that it's compatible with the web is definitely important,
though are you really worried that serializing as <option selected>
isn't compatible with the web?

/ Jonas
Received on Friday, 18 June 2010 11:01:48 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:24 UTC