Closed Bug 66636 Opened 24 years ago Closed 24 years ago

window.frames[] not using the ID of the frame as an index

Categories

(Core :: DOM: Core & HTML, defect)

All
Other
defect
Not set
normal

Tracking

()

VERIFIED WONTFIX

People

(Reporter: db48x, Assigned: jst)

References

()

Details

As you can see in the testcase, a frame with the name attribute may be retrieved from javascript as window.frames["NAME"]. It is reasonable to assume therefore that the ID attribute could be used in the same fashion, even though this is not explicitly mentioned by the javascript spec. (http://developer.netscape.com/docs/manuals/js/client/jsref/window.htm#1202300)
Sorry but that's invalid, please consider to look at form property's.
I would like a developer to address this. Thank you.
Status: UNCONFIRMED → NEW
Ever confirmed: true
fwiw, this does work correctly in IE5. Also note that theres a small typo in frame2alt.html :P Anyway, it doesn't have anything to do with forms.
Does this work in 4.x?
Actually, I can't get either version to work in 4.7x.
IMO it is not at all reasonable to assume that the value of the ID attribute on an [i]frame should be used as the name of the frame (window.frames[] is an array of the frames in the window and the array uses the name of the windows in the [i]frames as the key), the name attribute on [i]frames does map into the window name but IMO there's no reason to map the ID value of the [i]frame element into the window name. If you want the window in your frames to have a name then say "name='xxx'", if you don't want a name leave the name attribute unspecified. Plain and simple, no confusion, and no chance of a window ending up in the window.frames array more than once, and there's no question about what attribute is used as the window name if both are specified. This is something that adds one more order of complexity to the mozilla code with little or no return, just because this happens to work in IE doesn't mean it's correct, does it work in opera? Are there sites out there that rely on this? Marking WONTFIX.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
ok. I believe timeless was expecting this to happen in something he was working on.
yes i was expecting this to work because name was generally replaced with id, so I wanted to eliminate what appeared to be a useless pair. brendan: will you verify or reopen this bug?
WONTFIX verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.