(file)
| 35 | } |
| 36 | |
| 37 | function loadStyle(file) { |
| 38 | return new Promise(function(resolve) { |
| 39 | let css = document.createElement("link"); |
| 40 | css.rel = "stylesheet"; |
| 41 | css.href = function() { |
| 42 | if ("undefined" != typeof EJS_paths && typeof EJS_paths[file] === "string") { |
| 43 | return EJS_paths[file]; |
| 44 | } else { |
| 45 | return scriptPath + file; |
| 46 | } |
| 47 | }(); |
| 48 | css.onload = resolve; |
| 49 | css.onerror = () => { |
| 50 | filesmissing(file).then(e => resolve()); |
| 51 | } |
| 52 | document.head.appendChild(css); |
| 53 | }) |
| 54 | } |
| 55 | |
| 56 | async function filesmissing(file) { |
| 57 | console.error("Failed to load " + file); |
no test coverage detected