Skip to content

Commit

Permalink
Deploying to gh-pages from @ 75b7a3c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Jul 6, 2023
1 parent 4e2736c commit 68170eb
Show file tree
Hide file tree
Showing 4,137 changed files with 3,240,592 additions and 330,029 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion 3.10.0/manual/bindings.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</li><li class="drawermainmenu-page"><a href="https://github.com/ocsigen" class="ocsimore_phrasing_link">Source code</a>
</li></ul><nav class="how-doctree"><h1>Js_of_ocaml - Reference Manual</h1><h2><a href="overview" class="ocsimore_phrasing_link">Overview</a></h2><h2><a href="install" class="ocsimore_phrasing_link">Install</a></h2><h2><a href="library" class="ocsimore_phrasing_link">Library overview</a></h2><h2><a href="bindings" class="ocsimore_phrasing_link">Binding a JS library</a></h2><h2><a href="rev-bindings" class="ocsimore_phrasing_link">Export OCaml code to JavaScript</a></h2><h2><a href="../api/index.html" class="ocsimore_phrasing_link">API</a></h2><h1>Js_of_ocaml_lwt - Reference Manual</h1><h2><a href="lwt" class="ocsimore_phrasing_link">Lwt support</a></h2><h1>Syntaxes</h1><h2><a href="ppx" class="ocsimore_phrasing_link">Ppx syntax extension</a></h2><h2><a href="camlp4" class="ocsimore_phrasing_link">Camlp4 syntax extension</a></h2><h2><a href="ppx-deriving" class="ocsimore_phrasing_link">Ppx deriving json</a></h2><h1>Compiler</h1><h2><a href="options" class="ocsimore_phrasing_link">Command line options</a></h2><h2><a href="linker" class="ocsimore_phrasing_link">Link javascript code</a></h2><h2><a href="separate-compilation" class="ocsimore_phrasing_link">Separate compilation</a></h2><h2><a href="tailcall" class="ocsimore_phrasing_link">About tailcall optimization</a></h2><h1>Misc</h1><h2><a href="debug" class="ocsimore_phrasing_link">How to debug a program</a></h2><h2><a href="contribute" class="ocsimore_phrasing_link">How to contribute</a></h2><h2><a href="performances" class="ocsimore_phrasing_link">Performances</a></h2><h1>Js_of_ocaml examples</h1><h2><span><a href=".././manual/files/toplevel/index.html">An OCaml toplevel running in the browser</a></span></h2><h2><span><a href=".././manual/files/planet/index.html">An animated 3D view of the Earth</a></span></h2><h2><span><a href=".././manual/files/graph_viewer/index.html">A graph viewer</a></span></h2><h2><span><a href=".././manual/files/boulderdash/index.html">A Boulder Dash game</a></span></h2><h2><span><a href=".././manual/files/wiki/index.html">A realtime wiki editor</a></span></h2><h2><span><a href=".././manual/files/webgl/index.html">A webgl demo</a></span></h2><h2><span><a href=".././manual/files/minesweeper/index.html">A Minesweeper game</a></span></h2><h2><span><a href=".././manual/files/hyperbolic/index.html">A hyperbolic tree viewer</a></span></h2><h2><span><a href=".././manual/files/cubes/index.html">A random walk on lozenge tiling configurations</a></span></h2></nav></nav></aside></div><p class="reasonwarning">Warning: Reason support is experimental.
We are looking for beta-tester and contributors.
</p><button id="reason">Switch to </button><div class="twocols"><nav class="leftcol">Version <select class="how-versions" onchange="location = this.value;"><option value=".././../dev/manual/bindings">dev</option><option value=".././../5.2.0/manual/bindings">5.2.0</option><option value=".././../5.1.0/manual/bindings">5.1.0</option><option value=".././../5.0.1/manual/bindings">5.0.1</option><option value=".././../4.1.0/manual/bindings">4.1.0</option><option value=".././../4.0.0/manual/bindings">4.0.0</option><option value=".././../3.11.0/manual/bindings">3.11.0</option><option value=".././../3.10.0/manual/bindings" selected="selected">3.10.0</option><option value=".././../3.9.0/manual/bindings">3.9.0</option><option value=".././../3.8.0/manual/bindings">3.8.0</option><option value=".././../3.7.0/manual/bindings">3.7.0</option><option value=".././../3.6.0/manual/bindings">3.6.0</option><option value=".././../3.5.1/manual/bindings">3.5.1</option><option value=".././../3.5.0/manual/bindings">3.5.0</option></select><nav class="how-doctree"><h1>Js_of_ocaml - Reference Manual</h1><h2><a href="overview" class="ocsimore_phrasing_link">Overview</a></h2><h2><a href="install" class="ocsimore_phrasing_link">Install</a></h2><h2><a href="library" class="ocsimore_phrasing_link">Library overview</a></h2><h2><a href="bindings" class="ocsimore_phrasing_link">Binding a JS library</a></h2><h2><a href="rev-bindings" class="ocsimore_phrasing_link">Export OCaml code to JavaScript</a></h2><h2><a href="../api/index.html" class="ocsimore_phrasing_link">API</a></h2><h1>Js_of_ocaml_lwt - Reference Manual</h1><h2><a href="lwt" class="ocsimore_phrasing_link">Lwt support</a></h2><h1>Syntaxes</h1><h2><a href="ppx" class="ocsimore_phrasing_link">Ppx syntax extension</a></h2><h2><a href="camlp4" class="ocsimore_phrasing_link">Camlp4 syntax extension</a></h2><h2><a href="ppx-deriving" class="ocsimore_phrasing_link">Ppx deriving json</a></h2><h1>Compiler</h1><h2><a href="options" class="ocsimore_phrasing_link">Command line options</a></h2><h2><a href="linker" class="ocsimore_phrasing_link">Link javascript code</a></h2><h2><a href="separate-compilation" class="ocsimore_phrasing_link">Separate compilation</a></h2><h2><a href="tailcall" class="ocsimore_phrasing_link">About tailcall optimization</a></h2><h1>Misc</h1><h2><a href="debug" class="ocsimore_phrasing_link">How to debug a program</a></h2><h2><a href="contribute" class="ocsimore_phrasing_link">How to contribute</a></h2><h2><a href="performances" class="ocsimore_phrasing_link">Performances</a></h2><h1>Js_of_ocaml examples</h1><h2><span><a href=".././manual/files/toplevel/index.html">An OCaml toplevel running in the browser</a></span></h2><h2><span><a href=".././manual/files/planet/index.html">An animated 3D view of the Earth</a></span></h2><h2><span><a href=".././manual/files/graph_viewer/index.html">A graph viewer</a></span></h2><h2><span><a href=".././manual/files/boulderdash/index.html">A Boulder Dash game</a></span></h2><h2><span><a href=".././manual/files/wiki/index.html">A realtime wiki editor</a></span></h2><h2><span><a href=".././manual/files/webgl/index.html">A webgl demo</a></span></h2><h2><span><a href=".././manual/files/minesweeper/index.html">A Minesweeper game</a></span></h2><h2><span><a href=".././manual/files/hyperbolic/index.html">A hyperbolic tree viewer</a></span></h2><h2><span><a href=".././manual/files/cubes/index.html">A random walk on lozenge tiling configurations</a></span></h2></nav></nav><article class="rightcol"><h1> How to bind a JS library for OCaml</h1><h2>Accessing a JS variable, ex: <span class="teletype">document</span>:</h2><p>Write in .ml:
</p><button id="reason">Switch to </button><div class="twocols"><nav class="leftcol">Version <select class="how-versions" onchange="location = this.value;"><option value=".././../dev/manual/bindings">dev</option><option value=".././../5.4.0/manual/bindings">5.4.0</option><option value=".././../5.3.0/manual/bindings">5.3.0</option><option value=".././../5.2.0/manual/bindings">5.2.0</option><option value=".././../5.1.0/manual/bindings">5.1.0</option><option value=".././../5.0.1/manual/bindings">5.0.1</option><option value=".././../4.1.0/manual/bindings">4.1.0</option><option value=".././../4.0.0/manual/bindings">4.0.0</option><option value=".././../3.11.0/manual/bindings">3.11.0</option><option value=".././../3.10.0/manual/bindings" selected="selected">3.10.0</option><option value=".././../3.9.0/manual/bindings">3.9.0</option><option value=".././../3.8.0/manual/bindings">3.8.0</option><option value=".././../3.7.0/manual/bindings">3.7.0</option><option value=".././../3.6.0/manual/bindings">3.6.0</option><option value=".././../3.5.1/manual/bindings">3.5.1</option></select><nav class="how-doctree"><h1>Js_of_ocaml - Reference Manual</h1><h2><a href="overview" class="ocsimore_phrasing_link">Overview</a></h2><h2><a href="install" class="ocsimore_phrasing_link">Install</a></h2><h2><a href="library" class="ocsimore_phrasing_link">Library overview</a></h2><h2><a href="bindings" class="ocsimore_phrasing_link">Binding a JS library</a></h2><h2><a href="rev-bindings" class="ocsimore_phrasing_link">Export OCaml code to JavaScript</a></h2><h2><a href="../api/index.html" class="ocsimore_phrasing_link">API</a></h2><h1>Js_of_ocaml_lwt - Reference Manual</h1><h2><a href="lwt" class="ocsimore_phrasing_link">Lwt support</a></h2><h1>Syntaxes</h1><h2><a href="ppx" class="ocsimore_phrasing_link">Ppx syntax extension</a></h2><h2><a href="camlp4" class="ocsimore_phrasing_link">Camlp4 syntax extension</a></h2><h2><a href="ppx-deriving" class="ocsimore_phrasing_link">Ppx deriving json</a></h2><h1>Compiler</h1><h2><a href="options" class="ocsimore_phrasing_link">Command line options</a></h2><h2><a href="linker" class="ocsimore_phrasing_link">Link javascript code</a></h2><h2><a href="separate-compilation" class="ocsimore_phrasing_link">Separate compilation</a></h2><h2><a href="tailcall" class="ocsimore_phrasing_link">About tailcall optimization</a></h2><h1>Misc</h1><h2><a href="debug" class="ocsimore_phrasing_link">How to debug a program</a></h2><h2><a href="contribute" class="ocsimore_phrasing_link">How to contribute</a></h2><h2><a href="performances" class="ocsimore_phrasing_link">Performances</a></h2><h1>Js_of_ocaml examples</h1><h2><span><a href=".././manual/files/toplevel/index.html">An OCaml toplevel running in the browser</a></span></h2><h2><span><a href=".././manual/files/planet/index.html">An animated 3D view of the Earth</a></span></h2><h2><span><a href=".././manual/files/graph_viewer/index.html">A graph viewer</a></span></h2><h2><span><a href=".././manual/files/boulderdash/index.html">A Boulder Dash game</a></span></h2><h2><span><a href=".././manual/files/wiki/index.html">A realtime wiki editor</a></span></h2><h2><span><a href=".././manual/files/webgl/index.html">A webgl demo</a></span></h2><h2><span><a href=".././manual/files/minesweeper/index.html">A Minesweeper game</a></span></h2><h2><span><a href=".././manual/files/hyperbolic/index.html">A hyperbolic tree viewer</a></span></h2><h2><span><a href=".././manual/files/cubes/index.html">A random walk on lozenge tiling configurations</a></span></h2></nav></nav><article class="rightcol"><h1> How to bind a JS library for OCaml</h1><h2>Accessing a JS variable, ex: <span class="teletype">document</span>:</h2><p>Write in .ml:
</p><pre class=""><code class="language-ocaml translatable">let v = (Js.Unsafe.js_expr &quot;window&quot;)##.document</code></pre><p>Alternatively, the global object can be used. In the browser, it refers to <span class="teletype">window</span>.
</p><pre class=""><code class="language-ocaml translatable">let v = Js.Unsafe.global##.document</code></pre><p>and in .mli:
</p><pre class=""><code class="language-ocaml translatable">val v : ... Js.t</code></pre><p>Be careful the function <a href="../api/js_of_ocaml/Js_of_ocaml/Js/Unsafe/index.html/#val-js_expr" class="ocsimore_phrasing_link">Js.Unsafe.js_expr</a>
Expand Down
Loading

0 comments on commit 68170eb

Please sign in to comment.