Hi,
I am having trouble to find information about some javascript features. I have read the javascript guide and reference at netscape.com with no luck.
They are the next:
–
Can I call functions before defining them? (I like to have the most important code at the top of the script). I tried with moz and ie and it works, but I would like to know if the javascript standard permit to do this.
If I am trying to use an implementation dependant object like “window”, if I write the next code:
[code]
if (window) {
window.open(‘hi.html’, ‘link’);
}
This would give an error in a navigator that doesn’t have the window object implemented? To say this in another way, the “window.open(‘hi.html’, ‘link’);” will be checked in any way to know if it is well formed?
I know that in moz this line is not checked because there is no error in the javascript console. But this would mean that only the code on an actually executed branch statements are checked.
I don’t have very clear how a javascript is evaluated by a javascript interpreter.
Thanks a lot,
IrYoKu