Site Navigation

Sunday, March 16, 2008

bug 329 - Element.setAttribute('style', '...') fails in IE8 Beta 1

Issue: #329
Affects: IE8 Beta 1
Also Affects: IE6, IE7
Fixed In: IE8 RC1

The setAttribute() method was reported fixed in IE8 (whitepaper Pg.5), however some tests have indicated otherwise.

In particular, attempting to set the 'style' attribute on an element in IE8 Beta 1 still fails as it did in IE6, & IE7.

Please note that for any IE8 related bugs, all tests are done in "IE8 Standards Mode".


<script type="text/javascript">
var obj = document.getElementById('myObj');
//the following call will fail in IE8 Beta 1
obj.setAttribute('style','border:2px solid #ff0000;color:#00ff00;');

Known Workarounds: One. Although you can set:'cssText','...'); as outlined in (bug 245) IE8 was supposed to fix this, thus this is not an ideal workaround.

Related Issues: (bug 245), (bug 242).

Bug/Site Feedback |
Submit a bug