Closed Bug 115554 Opened 24 years ago Closed 24 years ago

CSS styles are not readable via JS

Categories

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

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED INVALID

People

(Reporter: golam, Assigned: jst)

Details

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6+) Gecko/20011209 BuildID: 2001120908 Style information filled in STYLE section via id is not accessable via JavaScript command such as: document.getElementById('[style id]').style.[style name] Return value of such operation is void. On other side, inline styles are working as expected. See proposed testcase. Reproducible: Always
Attached file testcase
bz: You're working on these issues, aren't you?
I'm the virtual bz ;-) This works as per the DOM spec. .style should only return the inline styles of the element. If you want to get the complete computed style of the element you should use the DOM Level 2 getComputedStyle method. Please see http://mozilla.org/docs/dom/domref/examples7.html#998756 for more information. Marking INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
verified. Things are exactly as Fabian said.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: