Closed Bug 101779 Opened 23 years ago Closed 23 years ago

getComputedStyle() does not work correctly in frames

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: harishd, Assigned: jst)

References

()

Details

(Keywords: testcase)

Opening up this bug in response to the following message in the newsgroup: I have placed an example at http://www.dylanschiemann.com/examples/fontSize3.html which seems to show that using getComputedStyle() across frames does not work the way you are trying to do so in the test harness. This is a cross-document issue... if you replace window with document.getElementById("contentarea").contentDocument.documentElement.defaultView , I get it to work as expected... See http://www.dylanschiemann.com/examples/fontSize4.html
I don't believe this is a bug per se, just an issue that developers must remember to deal with when working with the DOM across documents. For example, you can't create an element in one document and use appendChild to add a document in another frame's document. In my opinion, this should be marked INVALID.
Keywords: testcase
Yeah, this in invalid. You want to use the view of the document the element is actually in. Note: inline style (using a style="" attribute) is shown correctly cross-document because it does not rely on the stylesheets associated with a particular document. Marking invalid.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.