Closed
Bug 669884
Opened 13 years ago
Closed 13 years ago
Add-on SDK -- window.frames[0] returns undefined from content script
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
1.1
People
(Reporter: tjmart1, Assigned: ochameau)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0a1) Gecko/20110705 Firefox/7.0a1 Build ID: 20110705030811 Steps to reproduce: Using page-mod to run a content script on a site with a frameset. Actual results: From the content script, window.frames.length returns the correct number of frames, but window.frames[0] returns undefined. Using the web console on the same page, window.frames[0] returns the expected [object Window]. Expected results: window.frames[0] should return the frame's window object.
Reporter | ||
Comment 1•13 years ago
|
||
Sample file that loads google in a frame. Bug seemed present whether the frame src was same domain or not.
Reporter | ||
Comment 2•13 years ago
|
||
Huh, the "user friendly" bug report interface didn't indicate it was going to format everything like that! If I could figure out how, I'd edit this into the first post. Steps to reproduce: * Create a minimal extension with cfx init. * Replace main.js with the attached file * Download the attached html file and rename it FrameTest.html. (To match the pattern page-mod is looking for.) * Examine the console output.
Updated•13 years ago
|
Assignee: nobody → poirot.alex
Priority: -- → P2
Target Milestone: --- → 1.1
Assignee | ||
Updated•13 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 3•13 years ago
|
||
For the record, window === window.frames. I wasn't aware of this way of accessing frames: window[integer]/window.frames[integer] Here is the related implementation, Thanks Tim for the report!
Attachment #546560 -
Flags: review?(rFobic)
Comment 4•13 years ago
|
||
Comment on attachment 546560 [details] [diff] [review] Fix window.frame[integer] Review of attachment 546560 [details] [diff] [review]: ----------------------------------------------------------------- Looks ok, it would be nice if you could do `name in obj` tests though or otherwise annoying warnings get logged into console.
Attachment #546560 -
Flags: review?(rFobic) → review+
Assignee | ||
Comment 5•13 years ago
|
||
Landed: https://github.com/mozilla/addon-sdk/commit/8ebce8440a057c7ece9f643e9533c8da2d431be0
Assignee | ||
Comment 6•13 years ago
|
||
I opened bug 672784 in order to fix these warning messages.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•