W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

Re: Proposal for "Cascading Attribute Sheets" - like CSS, but for attributes!

From: Glenn Maynard <glenn@zewt.org>
Date: Tue, 21 Aug 2012 18:07:22 -0500
Message-ID: <CABirCh8R3YvMg3kCgqwAsDucOJiGZ8h0m_8aN-VKprLg2FJPYg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Brian Kardell <bkardell@gmail.com>, public-webapps <public-webapps@w3.org>, Ojan Vafai <ojan@chromium.org>
FWIW, while I don't find the idea of attaching event listeners this way too
interesting (maybe I could be convinced, but event capturing is already
convenient for most of these examples), being able to say "#myform input {
autocomplete: off; autocorrect: off; autocapitalize: off; }" or "a { rel:
noreferrer; }" would be great.

Having it not apply changes dynamically seems weird, since it looks and
feels like CSS.  It'd mean these two things--which look intuitively the
same, and behave the same with CSS--would be very different when parentNode
is in the document:

var div = createMyDiv();
parentNode.appendChild(div); // our attributes are applied
div.className = "foo"; // and we override them

var div = createMyDiv();
div.className = "foo"; // we set an attribute
parentNode.appendChild(div); // and it gets overwritten

Also, the behavior of the latter is different depending on whether
parentNode is within a document or not, so it's now also dependent on
whether, for example, "document.documentElement.appendChild(parentNode)"
happens before or after.

Glenn Maynard
Received on Tuesday, 21 August 2012 23:07:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:38 UTC