On Sun, 28 Jan 2007 23:58:51 +0100, Maciej Stachowiak <[EMAIL PROTECTED]>
wrote:
I tried to make some test cases to figure out the difference (in current
WebKit sources we changed to return the first match in document order to
match IE, and, we thought, Firefox), but Gecko's getElementById seems to
be really buggy. For instance, this alerts null:
<div id="foo">
</div>
<script>
alert(document.getElementById("foo"));
</script>
This is with Firefox 2.0.0.1 on Mac OS X. What am I doing wrong here?
I suspect that's the parsing bug where <script> is moved to <head> because
no significant content has occured yet (I'm not entirely sure how that
works or is determined).
--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>