Skip to content

Commit

Permalink
fix sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethosa committed May 19, 2024
1 parent e1588c4 commit 7f86da6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/website/src/pages/sandbox.nim
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ proc compile*() {.exportc.} =
// add new function
js = js.replace(/console\.log/g, 'hpx_log');
js = 'function hpx_log(...data){console.log(...data);window.parent.writeLine(data.toString())}\n' + js;
js = js.replace(/globalThis.originAddEventListener[\s\S]+?deep);\s*return clonedNode;\s*};/g, "");
scriptElem.innerHTML = "(() => {" + js + "})()";
// add children
let output = json['response']['output'];
Expand Down

0 comments on commit 7f86da6

Please sign in to comment.