Closed Bug 970134 Opened 11 years ago Closed 11 years ago

support setting hyphenated properties on element.style

Categories

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

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 958887

People

(Reporter: hsteen, Unassigned)

References

()

Details

(Whiteboard: DUPEME?)

Attachments

(1 file)

We're seeing a few sites (Google image search's touch UI being the most high-profile) failing because they try to set hyphenated property names on element.style - for example element.style['-moz-transform'] = ...

This is obviously an author error, but because it already breaks some things and due to https://miketaylr.com/posts/2014/01/yui-set-style-differences.html is likely to break even more. Webkit-based browsers handle this author error, and Gecko probably should too.
Also, last I checked, WebKit handles all sorts of case variations as well, and I think also mixes of hyphenation and casing.  Do other browsers?
IE (11) supports this too, like WebKit-family browsers. I have not tested anything besides plain vanilla hyphenated props.
Bug 958887 has some more data about the totally insane behavior WebKit has here, as well as about the differently insane behavior of IE11.

If we think we should just implement this, we should go ahead and start working on it.  It shouldn't be very hard to implement Simon's proposed spec (lowercase-only, on the prototype)

Note that this implies having a .float property, in addition to .cssFloat.  This shouldn't be a problem, though.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
No longer blocks: 793216
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: