mirror of https://github.com/dirtbags/moth.git
Fixing how resources are loaded so that scripts are run at load-time
This commit is contained in:
parent
5723e94bd7
commit
e29f815a0d
|
@ -48,7 +48,11 @@ function init() {
|
|||
li.appendChild(a);
|
||||
document.getElementById("files").appendChild(li);
|
||||
}
|
||||
document.getElementById("puzzle").innerHTML = obj.body;
|
||||
let range = document.createRange();
|
||||
let puzzleContainer = document.getElementById("puzzle");
|
||||
puzzleContainer.innerHTML = "";
|
||||
puzzleContainer.appendChild(range.createContextualFragment(obj.body));
|
||||
|
||||
}).catch(function(err) {
|
||||
console.log("Error", err);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue