diff options
Diffstat (limited to 'itjs')
-rw-r--r-- | itjs/boot.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/itjs/boot.js b/itjs/boot.js index a0ec24f..73ca86b 100644 --- a/itjs/boot.js +++ b/itjs/boot.js @@ -59,7 +59,7 @@ function it_boot_init() window.it_domtimer = null; var konqueror = navigator.userAgent.match(/konqueror/i); var doc = document; - var dom = doc && (dom = document.getElementById('it_boot_dom')); // HTML has been rendered + var dom = doc && (dom = doc.getElementById('it_boot_dom')); // HTML has been rendered var view = dom && doc.defaultView; // We can check if stylesheet is active var style = view && view.getComputedStyle && view.getComputedStyle(dom, ''); var css = window.it_boot_checkcss(style, "visibility", "hidden"); // CSS active (inline style on tag) @@ -143,8 +143,16 @@ function it_boot(file, isretry) } else { - var tag = document.createElement("script"); - tag.src = it_boot_addparam(file, 'init=1'); - dom.appendChild(tag); + var doc = document; + var dom = doc && (dom = doc.getElementById('it_boot_dom')); // HTML has been rendered + + if (dom) + { + var tag = doc.createElement("script"); + tag.src = it_boot_addparam(file, 'init=1'); + dom.appendChild(tag); + } + else + window.it_domtimer = window.setTimeout("it_boot('" + file + "')" , 42); } } |