Closed
Bug 47947
Opened 24 years ago
Closed 24 years ago
contentDocument property doesnt get populated remains undefined
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
INVALID
People
(Reporter: bora123, Assigned: pollmann)
Details
The contentDocument property of frames and iframes is not populated. Here is a test case. The contentDocument property remains undefined. You can put another file as src document from your local disk, or but it as "about:blank". <html> <head> <script> function dcontentDocument() { alert(window.frames['M1'].contentDocument); } </script> <body bgcolor="#c0c0c0"> <IFRAME width=400 height=400 NAME="M1" src="test1.htm"></IFRAME> <button onclick="dcontentDocument()">Show</button> </body> </html>
Assignee | ||
Comment 1•24 years ago
|
||
This attribute is new to DOM level 2: http://www.w3.org/TR/DOM-Level-2/idl-definitions.html The only description I found was here: http://msdn.microsoft.com/workshop/browser/hosting/printpreview/reference/properties/contentDocument.asp Johnny, do you know what the plans are for this one?
Component: HTMLFrames → DOM Level 2
Comment 2•24 years ago
|
||
The contentDocument property that the DOM defines is a property on the 'FRAME' or 'IFRAME' elements, it's not a property on the window object assocciated with the frame or iframe. So you either do: function dcontentDocument() { alert(window.frames['M1'].document); } or you do: function dcontentDocument() { alert(document.getElementsByName('M1')[0].contentDocument); } The window is not the same object as the element in the DOM that caused the window to show up, and they're not of the same type. Marking INVALID. (hope you don't mind Eric).
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Updated•24 years ago
|
Component: DOM Level 2 → DOM HTML
Component: DOM: HTML → DOM: Core & HTML
QA Contact: chrispetersen → general
You need to log in
before you can comment on or make changes to this bug.
Description
•