W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] We should not throw DOM Consistency and Infoset compatibility under the bus

From: Simon Pieters <simonp@opera.com>
Date: Wed, 06 Mar 2013 19:06:55 +0100
To: "Ian Hickson" <ian@hixie.ch>
Message-ID: <op.wtjdxtb3idj3kv@g160.guest-int.opera.com>
Cc: WHATWG <whatwg@whatwg.org>, Henri Sivonen <hsivonen@iki.fi>
On Wed, 06 Mar 2013 18:55:27 +0100, Ian Hickson <ian@hixie.ch> wrote:

> On Wed, 6 Mar 2013, Simon Pieters wrote:
>> On Mon, 14 Jan 2013 09:40:56 +0100, Henri Sivonen <hsivonen@iki.fi>  
>> wrote:
>> > Would it be terrible to make attempts to mutate the 'is' attribute
>> > throw thereby teaching authors who actually try to mutate it that it's
>> > not mutable?
>> We already have several attributes that are immutable but don't throw or
>> anything when they're changed.
>> e.g. <script src>, <html manifest>.
>> In the case of manifest, we omitted the IDL attribute to signal that it
>> shouldn't be changed.
>> As another example, <input type> was immutable in old IE and that made
>> people think of it as immutable.
> I think the content attributes should always be mutable, for consistency
> and to avoid unexpected crashes in code that just tries to set every
> attribute indiscriminately. (Much like how the DOM tree needs to be a  
> real
> tree, not a graph, so that code can walk it without fear of loops.)
> It's ok to have attributes that set some other variable that is itself
> immutable, though.

I'm trying to say that we can do this with is="".

> For example, <html manifest> sets the page's manifest
> URL, but you can't change the manifest URL, even though you _can_ change
> the element's attribute after the fact.
> In a sort of similar way, <script src> is mutable, it's just that it's
> only read at one point in the script processing model and it's the value
> at that point that matters.

Simon Pieters
Opera Software
Received on Wednesday, 6 March 2013 18:07:42 UTC

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