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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 21 Aug 2012 11:32:59 -0700
Message-ID: <CAAWBYDDYZ5WYqrx8Y1RZa7EVU=K4U0kvEPiY=it0kW4RqBgo0g@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: public-webapps@w3.org
On Tue, Aug 21, 2012 at 11:27 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/21/12 2:17 PM, Tab Atkins Jr. wrote:
>> My thought right now is that your CAS is only
>> applied to elements when they are inserted into the DOM
>
> If an element is removed, is the CAS "unapplied"?
>
> If not, what happens if the element is removed and then reinserted?

I'm thinking not.  Unapplying it requires you to track which changes
were made by CAS, and what the value was beforehand, and also deal
with after-the-fact setAttribute() and such.

Removing and reinserting would trigger the observer, and rerun all the
CAS applications.

>> (Slight weirdness here - a CAS file can reset its own @src attribute
>> to load *another* CAS file.  A <script> can do the same, though.
>> Acceptable or not?)
>
> A <script> is evaluated once, period.  Changing its @src after it has run
> does not start a new load.

Ah, I didn't realize that.  Sounds good, then.

~TJ
Received on Tuesday, 21 August 2012 18:33:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT