Closed
Bug 9378
Opened 26 years ago
Closed 25 years ago
document.layers returns null.
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
VERIFIED
FIXED
M13
People
(Reporter: desale, Assigned: vidur)
References
Details
Javascript command "document.layers" returns null instead of returning the
layers array.
Product: Seamonkey.[apprunner/Viewer]
Build: 1999-07-07-08
Platform: PC [Windows-95]
Steps to Reproduce:
1] Please copy the code I'm providing. Save as HTML file.
2] Open this HTML file in apprunner as well as viewer.
3] You'll see the value of document.layers gets printed.
Expected Results:
document.layers: [object LayerArray]
Actual Results:
document.layers: null
CODE:
<html>
<head>
<title>
</title>
</head>
<body>
<form name="propForm">
<script>
<!--
document.write("document.layers: ");
document.write(document.layers);
//-->
</script>
</form>
</body>
</html>
END OF CODE:
Right now I'm thinking it should go to vidur. It might go to ekrock, since its a
layer bug. Vidur, please assign it to ekrock if I'm wrong.
Reporter | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 1•26 years ago
|
||
I rescently entered this bug. After talking to vidur, came to know that we are
not going to support "document.layers" in 5.0, so that makes this bug invalid.
So I'm going ahead and marking it invalid.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 2•26 years ago
|
||
Invalid. Verified.
Updated•26 years ago
|
Status: VERIFIED → REOPENED
Comment 3•26 years ago
|
||
If you are not going to support
document.layers
it should be
undefined
instead of
null
Severity: normal → enhancement
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: INVALID → LATER
this will not be addressed for Comm 5.0 commericial product. How about we mark
Verified/Later so it gets addressed for 5.1? this is the best way to not lose
this enhancement for later.
Assignee | ||
Updated•26 years ago
|
Status: VERIFIED → REOPENED
Assignee | ||
Updated•26 years ago
|
Resolution: LATER → ---
Assignee | ||
Comment 5•26 years ago
|
||
I'm still interested in understanding why it has to be undefined and not null.
Shouldn't the if (document.layers) checks that are out there still fail for a
null value? Having said that, I agree that it probably makes sense to do what a
non-layers browser would do i.e. return undefined.
Comment 7•25 years ago
|
||
Moving all non-DOM[012], non-crash bugs to M15.
Comment 8•25 years ago
|
||
HTML DOM bugs are M11/P2 for Vidur.
Updated•25 years ago
|
Target Milestone: M11 → M13
Comment 9•25 years ago
|
||
Any theoretical considerations aside, we want code of this form:
if (document.layers) { /* Nav4 code */ }
else if (document.all) { /* IE4+ code */ }
else if {document.getElementsById) { /* Nav5 W3C DOM code */ }
... to work smoothly on Nav5 as there's a *lot* of it out there already, and we
want to make it as easy as possible for developers who already support Nav4/IE4
to upgrade and support Nav5, maintaining backward compatibility if possible. See
http://developer.netscape.com/docs/examples/javascript/browser_type.html for
more detail about this.
It seems that code of that form will work correctly regardless of whether we
return undefined or null. If I'm correct about that, then I'm fine with having
it return undefined (which does seem logical) rather than null.
If there is *ANY* way in which having document.layers return undefined rather
than null will make content/JS developers' lives harder, we should do whatever
will make their lives easier. Vidur, please use me if you need
chatting/research.
Either way, fixing this is a low priority. Moving to M13.
Assignee | ||
Comment 10•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•25 years ago
|
||
Rather than debate this more, I checked in a change to revert to Nav 4.x
behavior - we now return undefined.
You need to log in
before you can comment on or make changes to this bug.
Description
•