google-code-export / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 1 forks source link

StyleInjector fails to update contents on IE7 #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of gwt and gwt-incubator are you using?
gwt trunk - r3788
incubator trunk - r1158

What OS and browser are you using?
Windows XP Pro - IE7

Do you see this error in hosted mode, web mode, or both?
Both, but IE only

(If possible, please include a test case that shows the problem)
html:
<head>
  <style id="test" type="text/css"></style>
</head>

code:
styleElement = StyleElement.as(Document.get().getElementById("test"));
StyleInjector.setContents(styleElement, getStyleContent());

What is the expected output? What do you see instead?
An exception

Solution:
In StyleInjectorImplIE.setContents()
style.styleSheet.cssText = contents;

I found the solution here:
http://lawver.net/archive/2006/01/30/h16_changing_style_elements_in_ie.php

Original issue reported on code.google.com by simon.ca...@gmail.com on 10 Dec 2008 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by ecc%google.com@gtempaccount.com on 11 Dec 2008 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by bobv%google.com@gtempaccount.com on 11 Dec 2008 at 9:59