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 16:03:48 -0700
Message-ID: <CAAWBYDCQ-2TpegNqGRDCUcVE8N0uXbM3OXkqYGtnK3jx8eEGBQ@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: public-webapps <public-webapps@w3.org>, Ojan Vafai <ojan@chromium.org>
On Tue, Aug 21, 2012 at 3:54 PM, Brian Kardell <bkardell@gmail.com> wrote:
> On Aug 21, 2012 6:49 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>> On Tue, Aug 21, 2012 at 3:44 PM, Brian Kardell <bkardell@gmail.com> wrote:
>>> In other
>>> words,
>>> what is preventing you from writing...
>>>
>>> .foo .bar{
>>>     onclick: listen(create a .bar and attach it as a child of
>>> evt.target);
>>> }
>>
>> Nothing prevents you from writing that.  That's not problematic at
>> all, though.  When you click on a .bar, it creates a sibling .bar and
>> gives it the same onclick.  I think you've confused yourself into
>> thinking this is an infinite loop - it's not.
>>
>> Since you can't create a mutation observer with an attribute, I don't
>> think you can infinite-loop yourself at all.  Even if you could, it's
>> no more troublesome than the same possibility in pure JS.
>
> You are right, I was thinking that :)  I blame it on doing this all on my
> cell phone.  Ok.  If you click on the inner foo, now both will fire unless
> you pop the bubble, right?  That is probably fine.

Sure.  That's exactly what you wrote, so that's what we do.

> Do you need the quotes
> if you do it inside a type fn like listen?  Could we not parse around that?

I'd prefer not trying to do that.  Wouldn't we have to do JS parsing
in there?  String is easy, because you can just use CSS rules.

~TJ
Received on Tuesday, 21 August 2012 23:04:35 GMT

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