brothercake
09-30-2003, 12:42 AM
This is slightly worrying - I was under the impression that properties of objects in mozilla are not available until the entire document has finished loading; but I just tried out a complex menu script I'm working on, processing the <ul> without window.onload, just ensuring that the initialisation calls happen at the end of the script, which is after the <ul> in the document.
<ul>
... blah ...
</ul>
<script>
//object constructor
//a few methods
//call object constructor
</script>
And it works fine. But I feel worried. Are there circumstances under which it won't work so fluidly, or am I being paranoid for nothing?
<ul>
... blah ...
</ul>
<script>
//object constructor
//a few methods
//call object constructor
</script>
And it works fine. But I feel worried. Are there circumstances under which it won't work so fluidly, or am I being paranoid for nothing?