This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21892 - cross-browser method or property for get/set style in js
Summary: cross-browser method or property for get/set style in js
Status: RESOLVED INVALID
Alias: None
Product: WHATWG
Classification: Unclassified
Component: JavaScript (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 enhancement
Target Milestone: Unsorted
Assignee: Mathias Bynens
QA Contact: sideshowbarker+javascript
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-01 09:48 UTC by Jim Michaels
Modified: 2014-06-21 12:53 UTC (History)
1 user (show)

See Also:


Attachments

Description Jim Michaels 2013-05-01 09:48:19 UTC
cross-browser method or property for get/set style in js
no code I have seen works cross browser. we need a standard/recommendation.
for example from now on, using BOTH
document.getElementById(id).style.display="none";
and
document.getElementById(id).style["display"]="none";
or using at least the 2nd, which is more conducive to generic programming.
Comment 1 Mathias Bynens 2014-06-21 12:53:10 UTC
This is outside the scope of the JavaScript / Web ECMAScript spec. See <http://javascript.spec.whatwg.org/#goals>.