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

[whatwg] Preventing nested click() calls

From: Antti Koivisto <antti@apple.com>
Date: Fri, 14 Mar 2008 12:08:36 -0700
Message-ID: <65698D6A-533A-43AD-9AE8-0A8A0E01637B@apple.com>
In practice all browsers already treat click() as a special case.  
Removing the nesting protection completely (and relying on js stack  
limits) would break web sites so it is not an option. The only  
question is whether the limit should be 1 or some other number.  
Matching the existing implementations and disallowing nesting seems  
like a right thing to do here.


    antti

On 14.3.2008, at 11:04, Erik Arvidsson wrote:

> To me it just seems wrong to prevent this.  This is in theory no
> different than a recursive call and just like recursion it can end up
> in an infinite loop.  Having a limit seems OK since most JavaScript
> engines already have a limit on the size of the call stack.
>
> On Mon, Mar 10, 2008 at 11:54, Anne van Kesteren <annevk at opera.com>  
> wrote:
>> On Mon, 10 Mar 2008 19:49:21 +0100, Antti Koivisto  
>> <antti at apple.com> wrote:
>>
>>> WebKit, Firefox and IE all implement a protection mechanism against
>> re-entering click() on the same element:
>>>
>>> <input type="checkbox" onclick="this.click()">
>>>
>>
>> Opera had the same restriction. We now limit it at 50 or so... I  
>> think
>> we're fine either way though.
>>
>>
>> --
>> Anne van Kesteren
>> <http://annevankesteren.nl/>
>> <http://www.opera.com/>
>>
>
>
>
> -- 
> erik
Received on Friday, 14 March 2008 12:08:36 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:40 UTC