Closed
Bug 244281
Opened 22 years ago
Closed 22 years ago
element.style.float not working, gives javascript error "missing name after . operator"
Categories
(Core :: DOM: CSS Object Model, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 170778
People
(Reporter: mozilla, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
163 bytes,
text/html
|
Details |
.style.float isn't working for me at all, either to get or set the CSS "float"
property. The JS Console gives me the error "missing name after . operator",
and points to the "." right before "float".
Likely a regression, unless I am doing something obviously wrong.
Testcase to follow.
Mozilla 1.7rc2 (so it's on the 1.7 Branch)
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040514
| Reporter | ||
Comment 1•22 years ago
|
||
Testcase. Should bring up an alert box showing the value of div1.style.float,
but instead gives a JS error. Can someone else confirm this? Works fine in
IE.
Updated•22 years ago
|
Flags: blocking1.7?
Comment 2•22 years ago
|
||
Well, there is no float property in the dom css level 2, I guess.
See:
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties-cssFloat
When you use alert(div1.style.cssFloat); it works (also in Opera7).
Comment 3•22 years ago
|
||
*** This bug has been marked as a duplicate of 170778 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Comment 4•22 years ago
|
||
Verified. "float" is a reserved word in many languages (JavaScript included!)
so the spec doesn't use it, for precisely the reason you found.
Note that IE doesn't implement JavaScript but rather JScript; a similar language
on the surface, but rather different underneath.
| Reporter | ||
Comment 5•22 years ago
|
||
Thanks for the clarification. Sorry about filing an invalid bug. I'll be sure
to discuss things like this in the forums from now on before filing. (I had
asked on IRC, but got no response).
You need to log in
before you can comment on or make changes to this bug.
Description
•