From: Alan Knowles Date: Thu, 4 Aug 2011 07:04:54 +0000 (+0000) Subject: ieconsole - create css on the fly X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=8fc8396dafb2f57790fefc161e9441c128a36b27 ieconsole - create css on the fly --- diff --git a/ux/ieconsole.js b/ux/ieconsole.js index 165051b089..7b391cb2fb 100644 --- a/ux/ieconsole.js +++ b/ux/ieconsole.js @@ -16,7 +16,36 @@ if(!window.console){ if(!document.getElementById(id)){ console.d.id=id; } + var st = console.d.style; + st.position = 'absolute'; + st.top = 0; + st.right = 0; + st.width='300px'; + st.border = '1px solid #999'; + st.fontFamily = 'courier,monospace'; + st.background = '#eee'; + st.fontSize = '10px'; + st.padding = '10px'; + st.zIndex = 100000; + st.overflow = "auto"; + + console.hide(); + + + var CSS = "\n" + + '#fauxconsole a{'+ + ' float:right;'+ + ' padding-left:1em;'+ + ' padding-bottom:.5em;'+ + ' text-align:right;'+ + '}'; + var htmDiv = document.createElement('div'); + htmDiv.innerHTML = '

 

'; + document.body.appendChild(htmDiv); + + + }, hide:function(){ console.d.style.display='none'; @@ -25,6 +54,9 @@ if(!window.console){ console.d.style.display='block'; }, log:function(o){ + if (!console.d) { + console.init(); + } console.d.innerHTML+='
'+o; console.show(); },