- From: Cameron McCormack <cam@mcc.id.au>
- Date: Wed, 04 Jan 2012 14:21:37 +1100
- To: Ojan Vafai <ojan@chromium.org>
- CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>, Travis Leithead <Travis.Leithead@microsoft.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Ian Hickson <ian@hixie.ch>
Ojan Vafai: > Firefox behaves differently for frames and elements I believe (or maybe > names versus IDs?). > > <div id="a"></div><script>alert(a);</script> // Alerts "[object > HTMLDivElement]" > <div id="a"></div><script>alert(a);var a;</script> // Alerts "undefined" > <div id="a"></div><script>var a;alert(a);</script> // Alerts "undefined" Note that the last two should always be the same because property creation due to var statements is handled first before the script is run.
Received on Wednesday, 4 January 2012 03:24:48 UTC