On Tue, Aug 21, 2012 at 3:54 PM, Brian Kardell <bkard...@gmail.com> wrote:
> On Aug 21, 2012 6:49 PM, "Tab Atkins Jr." <jackalm...@gmail.com> wrote:
>> On Tue, Aug 21, 2012 at 3:44 PM, Brian Kardell <bkard...@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

Reply via email to