some progress

This commit is contained in:
cqc
2024-02-14 16:15:49 -06:00
parent 0f1fd67e8a
commit e2a574d215
18 changed files with 1420 additions and 216 deletions

View File

@ -153,14 +153,14 @@
var fields = hash.split(/&/);
var prefix = "";
var version = "";
var main = "toplevel.bc.js";
var main = "oplevel.bc.js";
for(var f in fields){
var data = fields[f].split(/=/);
if(data[0] == "version"){
version = data[1].replace(/%20|%2B/g,"+");
}
else if (data[0] == "separate"){
main = "toplevel.bc.js";
main = "oplevel.bc.js";
}
}
function load_script(url){
@ -185,45 +185,9 @@
</div>
</div>
<div id="toplevel-side">
<h3>Js_of_ocaml</h3>
<h4>A compiler from OCaml bytecode to Javascript.</h4>
<p>It makes OCaml programs that run on Web browsers. It is
easy to install as it works with an existing installation of OCaml,
with no need to recompile any library. It comes with bindings for a
large part of the browser APIs.</p>
<p>This web-based OCaml toplevel is compiled using Js_of_ocaml.</p>
<h4>Command</h4>
<table class="table table-striped table-condensed">
<tbody class>
<tr>
<td>Enter/Return</td>
<td>Submit code</td>
</tr>
<tr>
<td>Ctrl + Enter</td>
<td>Newline</td>
</tr>
<tr>
<td>Up / Down</td>
<td>Browse history</td>
</tr>
<tr>
<td>Ctrl + l</td>
<td>Clear display</td>
</tr>
<tr>
<td>Ctrl + k</td>
<td>Reset toplevel</td>
</tr>
<tr>
<td>Tab</td>
<td>Indent code</td>
</tr>
</tbody>
</table>
<h4>Try to execute samples</h4>
<div id="toplevel-examples" class="list-group"></div>
<h3>OpLevel</h3>
<h4>A programming system based on a compiler from OCaml bytecode to Javascript.</h4>
<div id="toplevel-storeview" class="list-group"></div>
<canvas width=200 height=200 id="test-canvas"></canvas>
<h4 class="clear">See the generated javascript code</h4>
<pre id="last-js">