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

[whatwg] Preventing nested click() calls

From: Geoffrey Garen <ggaren@apple.com>
Date: Fri, 14 Mar 2008 12:10:15 -0700
Message-ID: <D4AAF12B-ACEE-46A7-89B2-0082842EE142@apple.com>
> 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.

You're right, it is no different *in theory*. It is, however,  
different in practice. If we allow click() to re-enter itself, popular  
websites stop working.

>  Having a limit seems OK since most JavaScript
> engines already have a limit on the size of the call stack.

The concern here isn't implementation complexity -- it's web  
compatibility. A standard that breaks the web is no standard at all.

Geoff
Received on Friday, 14 March 2008 12:10:15 UTC

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