W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

Re: indexed properties on NodeLists and HTMLCollections

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 06 May 2011 09:05:34 -0400
Message-ID: <4DC3F21E.3050400@mit.edu>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: Cameron McCormack <cam@mcc.id.au>, public-script-coord@w3.org
On 5/6/11 2:22 AM, Allen Wirfs-Brock wrote:
> function f() {
>     var myLocal = callSomeFunctionIDidntWriteThatReturnsSomeObject();
>     alert(myLocal.toString);  //built-in toString function
>     callSomeOtherFunctionIDidntWrite();
>     alert(myLocal.toString);   //displays some other value because a toString property was added to the myGlobal obj by the function
>     callAnotherFunctionIdontKnowMuchAbout();
>     alert(myLocal.toString);  //built-in toString function because the function deleted the property the new toString property from the obj
> }();

Sure, that's closer to how nodelists actually behave.

Waiting for that separate message, since the main issue here is not 
whether nodelists mutate but whether they can sanely be implemented in ES.

-Boris
Received on Friday, 6 May 2011 13:06:04 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC