(url)
| 90 | } |
| 91 | |
| 92 | function loadScript(url) |
| 93 | { |
| 94 | var script = document.createElement('script'), |
| 95 | done = false |
| 96 | ; |
| 97 | |
| 98 | script.src = url; |
| 99 | script.type = 'text/javascript'; |
| 100 | script.language = 'javascript'; |
| 101 | script.onload = script.onreadystatechange = function() |
| 102 | { |
| 103 | if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) |
| 104 | { |
| 105 | done = true; |
| 106 | scripts[url] = true; |
| 107 | checkAll(); |
| 108 | |
| 109 | // Handle memory leak in IE |
| 110 | script.onload = script.onreadystatechange = null; |
| 111 | script.parentNode.removeChild(script); |
| 112 | } |
| 113 | }; |
| 114 | |
| 115 | // sync way of adding script tags to the page |
| 116 | document.body.appendChild(script); |
| 117 | }; |
| 118 | |
| 119 | function checkAll() |
| 120 | { |
no test coverage detected