for (i in window)
doesn't return all properties in Netscape 4.7. Specifically, it
doesn't return statusbar and menubar, among others.
typeof(window.statusbar) returns "object"
window.statusbar.constructor returns:
"function Bar() { [native code] }"
Isn't the "for (... in <object>)" statement supposed to return all the
properties of the object? Is this a bug in Netscape 4.7? Is there any
workaround?
It is not a bug. Object properties can be marked DONTENUM, which causes them
to be ignored by for...in.
http://home.earthlink.net/~crockford/javascript/recommend.html
Actually, the status property IS returned. Try this:
<SCRIPT LANGUAGE="JavaScript">
// Set a status text
window.status="Some text";
var s = "";
// Loop through the object
for (i in window) {
s += i + "=" + window[i]+"<br>";
}
document.write(s);
</SCRIPT>
Search in the generated method listing for 'status' and you will find:
status=Some text
Regards,
Janwillem
jsu...@anon.com wrote:
--
Martin Honnen
http://javascript.faqts.com/
http://home.t-online.de/home/martin.honnen/jsgoddies.html