Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Feb 1, 2023
1 parent 711f8dd commit 7af2c68
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions toplevel/examples/lwt_toplevel/dune
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,7 @@
(alias
(name default)
(deps toplevel.js index.html))

(alias
(name separate)
(deps toplevel.bc.js))
7 changes: 5 additions & 2 deletions toplevel/examples/lwt_toplevel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@
var fields = hash.split(/&/);
var prefix = "";
var version = "";
var main = "toplevel.js";
for(var f in fields){
var data = fields[f].split(/=/);
if(data[0] == "version"){
version = data[1].replace(/%20|%2B/g,"+");
break;
}
else if (data[0] == "separate"){
main = "toplevel.bc.js";
}
}
function load_script(url){
Expand All @@ -167,7 +170,7 @@
document.getElementsByTagName("head")[0].appendChild(fileref);
}
load_script("exported-unit.cmis.js");
load_script("toplevel.bc.js");
load_script(main);

</script>
</head>
Expand Down

0 comments on commit 7af2c68

Please sign in to comment.