ux/ieconsole.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 4 Aug 2011 05:18:22 +0000 (13:18 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 4 Aug 2011 05:18:22 +0000 (13:18 +0800)
ux/ieconsole.js

index 55b84fe..b59a3d5 100644 (file)
@@ -20,7 +20,12 @@ if(!window.console){
             var st = document.createElement('style');
             st.type="text/css";
             st.media="all";
-            st.appendChild(document.createTextNode("\n" + 
+            
+            var cssStr = "div {color:blue;}";
+            var style = document.createElement("style");
+            style.setAttribute("type", "text/css");
+             
+            style.styleSheet.cssText = "\n" + 
                 '#fauxconsole{' +
                 '    position:absolute;' +
                 '    top:0;'+
@@ -40,7 +45,7 @@ if(!window.console){
                 '    padding-left:1em;'+
                 '    padding-bottom:.5em;'+
                 '    text-align:right;'+
-                '}'))
+                '}'; 
             
             
             document.getElementsByTagName("head")[0].appendChild(st);