[Webkit-unassigned] [Bug 29135] New: window.frames returns 1-based array of frames

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 10 11:55:13 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29135

           Summary: window.frames returns 1-based array of frames
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: grant_gayed at ca.ibm.com


- observed in Safari 4.0.3 (5531.9)

- view the page below
- navigate to some other page, which invokes the current page's onbeforeunload
- this prints the names of the frames in the window.frames array, and observe
that the array is 1-based instead of the expected 0-based: frame "1" is in
array positions 0 and 1 (instead of just position 0), and frame "2" is in array
position 2 (instead of position 1)

<html>
<head>
<script>
function closeIt()
{
  for (var i = 0; i <= window.frames.length; i++) {
    alert('frame name: ' + window.frames[i].name + ' i=' + i);
  }
}
window.onbeforeunload = closeIt;
</script>
</head>
<frameset cols="50%,50%">
  <frame name="1" src="http://www.asdf.com">
  <frame name="2" src="http://www.qwerty.com">
</frameset>
</html>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list