Closed Bug 972902 Opened 11 years ago Closed 10 years ago

window.frames order does not conform to spec. If new items added by JS they are not returned in tree order

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: automatedtester, Unassigned)

References

()

Details

if we use the example below, window.frames[0] manipulates the 2nd frame

<!DOCTYPE html>
  <body>
    <div id="div">
  </div>

  <div>
  <iframe src="http://www.seleniumhq.org/download"></iframe>
  </div>

  <script type="text/javascript">
  document.getElementById("div").innerHTML='<iframe src="http://www.seleniumhq.org/"></iframe>';
. </script>


I have tested this in Chrome, Firefox and IE and only IE returns this in the order I expect(window.frames[0] being the top frame when viewing the page). 

This was brought up in https://www.w3.org/Bugs/Public/show_bug.cgi?id=24635
I think the spec is wrong here, since it doesn't match most browsers.  Filed https://www.w3.org/Bugs/Public/show_bug.cgi?id=24662
The spec was updated to how we do it
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.