Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > b4603fcd3afb71dfbec25f4867b993f4 > files > 300

js_of_ocaml-doc-2.4.1-2.mga5.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Lwt_js.html">
<link rel="next" href="Regexp.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="CSS" rel="Chapter" href="CSS.html">
<link title="Dom" rel="Chapter" href="Dom.html">
<link title="Dom_events" rel="Chapter" href="Dom_events.html">
<link title="Dom_html" rel="Chapter" href="Dom_html.html">
<link title="Dom_svg" rel="Chapter" href="Dom_svg.html">
<link title="EventSource" rel="Chapter" href="EventSource.html">
<link title="File" rel="Chapter" href="File.html">
<link title="Firebug" rel="Chapter" href="Firebug.html">
<link title="Form" rel="Chapter" href="Form.html">
<link title="Js" rel="Chapter" href="Js.html">
<link title="Json" rel="Chapter" href="Json.html">
<link title="Jsonp" rel="Chapter" href="Jsonp.html">
<link title="Keycode" rel="Chapter" href="Keycode.html">
<link title="Lwt_js" rel="Chapter" href="Lwt_js.html">
<link title="Lwt_js_events" rel="Chapter" href="Lwt_js_events.html">
<link title="Regexp" rel="Chapter" href="Regexp.html">
<link title="Sys_js" rel="Chapter" href="Sys_js.html">
<link title="Typed_array" rel="Chapter" href="Typed_array.html">
<link title="Url" rel="Chapter" href="Url.html">
<link title="WebGL" rel="Chapter" href="WebGL.html">
<link title="WebSockets" rel="Chapter" href="WebSockets.html">
<link title="XmlHttpRequest" rel="Chapter" href="XmlHttpRequest.html">
<link title="Lwt_log_js" rel="Chapter" href="Lwt_log_js.html">
<link title="JsooTop" rel="Chapter" href="JsooTop.html">
<link title="Ocamlbuild_js_of_ocaml" rel="Chapter" href="Ocamlbuild_js_of_ocaml.html">
<link title="Deriving_Json" rel="Chapter" href="Deriving_Json.html">
<link title="Deriving_Json_lexer" rel="Chapter" href="Deriving_Json_lexer.html">
<link title="Pa_deriving_Json" rel="Chapter" href="Pa_deriving_Json.html"><link title="Create Lwt threads for events" rel="Section" href="#2_CreateLwtthreadsforevents">
<link title="Predefined functions for some types of events" rel="Section" href="#2_Predefinedfunctionsforsometypesofevents">
<title>Lwt_js_events</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Lwt_js.html" title="Lwt_js">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Regexp.html" title="Regexp">Next</a>
</div>
<h1>Module <a href="type_Lwt_js_events.html">Lwt_js_events</a></h1>

<pre><span class="keyword">module</span> Lwt_js_events: <code class="code">sig</code> <a href="Lwt_js_events.html">..</a> <code class="code">end</code></pre><div class="info module top">
Programming mouse or keyboard events handlers using Lwt<br>
</div>
<hr width="100%">
<br>
Reminder:
   Event capturing starts with the outer most element in the DOM and
   works inwards to the HTML element the event took place on (capture phase)
   and then out again (bubbling phase).<br>
<br>
<h2 id="2_CreateLwtthreadsforevents">Create Lwt threads for events</h2><br>

<pre><span id="VALmake_event"><span class="keyword">val</span> make_event</span> : <code class="type">(#<a href="Dom_html.event-c.html">Dom_html.event</a> as 'a) <a href="Js.html#TYPEt">Js.t</a> <a href="Dom_html.Event.html#TYPEtyp">Dom_html.Event.typ</a> -><br>       ?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> 'a <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre><div class="info ">
<code class="code">make_event ev target</code> creates a Lwt thread that waits
    for the event <code class="code">ev</code> to happen on <code class="code">target</code> (once).
    This thread is cancellable using
    .
    If you set the optional parameter <code class="code">~use_capture:true</code>,
    the event will be caught during the capture phase,
    otherwise it is caught during the bubbling phase
    (default).<br>
</div>

<pre><span id="VALseq_loop"><span class="keyword">val</span> seq_loop</span> : <code class="type">(?use_capture:bool -> 'target -> 'event Lwt.t) -><br>       ?cancel_handler:bool -><br>       ?use_capture:bool -><br>       'target -> ('event -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre><div class="info ">
<code class="code">seq_loop (make_event ev) target handler</code> creates a looping Lwt
    thread that waits for the event <code class="code">ev</code> to happen on <code class="code">target</code>, then
    execute handler, and start again waiting for the event. Events
    happening during the execution of the handler are ignored. See
    <code class="code">async_loop</code> and <code class="code">buffered_loop</code> for alternative semantics.
<p>

    For example, the <code class="code">clicks</code> function below is defined by:
<p>

    <code class="code">let clicks ?use_capture t = seq_loop click ?use_capture t</code>
<p>

    The thread returned is cancellable using
    .
    In order for the loop thread to be canceled from within the handler,
    the latter receives the former as its second parameter.
<p>

    By default, cancelling the loop will not cancel the potential
    currently running handler. This behaviour can be changed by
    setting the <code class="code">cancel_handler</code> parameter to true.<br>
</div>

<pre><span id="VALasync_loop"><span class="keyword">val</span> async_loop</span> : <code class="type">(?use_capture:bool -> 'target -> 'event Lwt.t) -><br>       ?use_capture:bool -><br>       'target -> ('event -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre><div class="info ">
<code class="code">async_loop</code> is similar to <code class="code">seq_loop</code>, but each handler runs
    independently. No event is thus missed, but since several
    instances of the handler can be run concurrently, it is up to the
    programmer to ensure that they interact correctly.
<p>

    Cancelling the loop will not cancel the potential currently running
    handlers.<br>
</div>

<pre><span id="VALbuffered_loop"><span class="keyword">val</span> buffered_loop</span> : <code class="type">(?use_capture:bool -> 'target -> 'event Lwt.t) -><br>       ?cancel_handler:bool -><br>       ?cancel_queue:bool -><br>       ?use_capture:bool -><br>       'target -> ('event -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre><div class="info ">
<code class="code">buffered_loop</code> is similar to <code class="code">seq_loop</code>, but any event that
    occurs during an execution of the handler is queued instead of
    being ingnored.
<p>

    No event is thus missed, but there can be a non predictible delay
    between its trigger and its treatment. It is thus a good idea to
    use this loop with handlers whose running time is short, so the
    memorized event still makes sense when the handler is eventually
    executed. It is also up to the programmer to ensure that event
    handlers terminate so the queue will eventually be emptied.
<p>

    By default, cancelling the loop will not cancel the (potential)
    currently running handler, but any other queued event will be
    dropped. This behaviour can be customized using the two optional
    parameters <code class="code">cancel_handler</code> and <code class="code">cancel_queue</code>.<br>
</div>

<pre><span id="VALasync"><span class="keyword">val</span> async</span> : <code class="type">(unit -> 'a Lwt.t) -> unit</code></pre><div class="info ">
<code class="code">async t</code> records a thread to be executed later.
    It is implemented by calling yield, then Lwt.async.
    This is useful if you want to create a new event listener
    when you are inside an event handler.
    This avoids the current event to be catched by the new event handler
    (if it propagates).<br>
</div>

<pre><span id="VALfunc_limited_loop"><span class="keyword">val</span> func_limited_loop</span> : <code class="type">(?use_capture:bool -> 'a -> 'b Lwt.t) -><br>       (unit -> 'a Lwt.t) -><br>       ?use_capture:bool -> 'a -> ('b -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre><div class="info ">
<code class="code">func_limited_loop event delay_fun target handler</code> will behave like
    <code class="code">Lwt_js_events.async_loop event target handler</code> but it will run <code class="code">delay_fun</code>
    first, and execut <code class="code">handler</code> only when <code class="code">delay_fun</code> is finished and
    no other event occurred in the meantime.
<p>

    This allows to limit the number of events catched.
<p>

    Be careful, it is an asynchrone loop, so if you give too little time,
    several instances of your handler could be run in same time *<br>
</div>

<pre><span id="VALlimited_loop"><span class="keyword">val</span> limited_loop</span> : <code class="type">(?use_capture:bool -> 'a -> 'b Lwt.t) -><br>       ?elapsed_time:float -><br>       ?use_capture:bool -> 'a -> ('b -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre><div class="info ">
Same as func_limited_loop but take time instead of function
    By default elapsed_time = 0.1s = 100ms *<br>
</div>
<br>
<h2 id="2_Predefinedfunctionsforsometypesofevents">Predefined functions for some types of events</h2><br>

<pre><span id="VALclick"><span class="keyword">val</span> click</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdblclick"><span class="keyword">val</span> dblclick</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmousedown"><span class="keyword">val</span> mousedown</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmouseup"><span class="keyword">val</span> mouseup</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmouseover"><span class="keyword">val</span> mouseover</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmousemove"><span class="keyword">val</span> mousemove</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmouseout"><span class="keyword">val</span> mouseout</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALkeypress"><span class="keyword">val</span> keypress</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALkeydown"><span class="keyword">val</span> keydown</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALkeyup"><span class="keyword">val</span> keyup</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALinput"><span class="keyword">val</span> input</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALtimeupdate"><span class="keyword">val</span> timeupdate</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALchange"><span class="keyword">val</span> change</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdragstart"><span class="keyword">val</span> dragstart</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdragend"><span class="keyword">val</span> dragend</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdragenter"><span class="keyword">val</span> dragenter</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdragover"><span class="keyword">val</span> dragover</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdragleave"><span class="keyword">val</span> dragleave</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdrag"><span class="keyword">val</span> drag</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALdrop"><span class="keyword">val</span> drop</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALfocus"><span class="keyword">val</span> focus</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALblur"><span class="keyword">val</span> blur</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALscroll"><span class="keyword">val</span> scroll</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALsubmit"><span class="keyword">val</span> submit</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALselect"><span class="keyword">val</span> select</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALmousewheel"><span class="keyword">val</span> mousewheel</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> * (int * int)) Lwt.t</code></pre><div class="info ">
This function returns the event,
    together with the numbers of ticks the mouse wheel moved.
    Positive means down or right.
    This interface is compatible with all (recent) browsers.<br>
</div>

<pre><span id="VALtouchstart"><span class="keyword">val</span> touchstart</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALtouchmove"><span class="keyword">val</span> touchmove</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALtouchend"><span class="keyword">val</span> touchend</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALtouchcancel"><span class="keyword">val</span> touchcancel</span> : <code class="type">?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALtransitionend"><span class="keyword">val</span> transitionend</span> : <code class="type">#<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t</code></pre><div class="info ">
Returns when a CSS transition terminates on the element.<br>
</div>

<pre><span id="VALload"><span class="keyword">val</span> load</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.imageElement-c.html">Dom_html.imageElement</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALerror"><span class="keyword">val</span> error</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.imageElement-c.html">Dom_html.imageElement</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALabort"><span class="keyword">val</span> abort</span> : <code class="type">?use_capture:bool -> #<a href="Dom_html.imageElement-c.html">Dom_html.imageElement</a> <a href="Js.html#TYPEt">Js.t</a> -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALclicks"><span class="keyword">val</span> clicks</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdblclicks"><span class="keyword">val</span> dblclicks</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmousedowns"><span class="keyword">val</span> mousedowns</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmouseups"><span class="keyword">val</span> mouseups</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmouseovers"><span class="keyword">val</span> mouseovers</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmousemoves"><span class="keyword">val</span> mousemoves</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmouseouts"><span class="keyword">val</span> mouseouts</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALkeypresses"><span class="keyword">val</span> keypresses</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALkeydowns"><span class="keyword">val</span> keydowns</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALkeyups"><span class="keyword">val</span> keyups</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.keyboardEvent-c.html">Dom_html.keyboardEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALinputs"><span class="keyword">val</span> inputs</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALtimeupdates"><span class="keyword">val</span> timeupdates</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALchanges"><span class="keyword">val</span> changes</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdragstarts"><span class="keyword">val</span> dragstarts</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdragends"><span class="keyword">val</span> dragends</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdragenters"><span class="keyword">val</span> dragenters</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdragovers"><span class="keyword">val</span> dragovers</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdragleaves"><span class="keyword">val</span> dragleaves</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdrags"><span class="keyword">val</span> drags</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALdrops"><span class="keyword">val</span> drops</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.dragEvent-c.html">Dom_html.dragEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALmousewheels"><span class="keyword">val</span> mousewheels</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.mouseEvent-c.html">Dom_html.mouseEvent</a> <a href="Js.html#TYPEt">Js.t</a> * (int * int) -> unit Lwt.t -> unit Lwt.t) -><br>       unit Lwt.t</code></pre>
<pre><span id="VALtouchstarts"><span class="keyword">val</span> touchstarts</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALtouchmoves"><span class="keyword">val</span> touchmoves</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALtouchends"><span class="keyword">val</span> touchends</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALtouchcancels"><span class="keyword">val</span> touchcancels</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.touchEvent-c.html">Dom_html.touchEvent</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALfocuses"><span class="keyword">val</span> focuses</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALblurs"><span class="keyword">val</span> blurs</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALscrolls"><span class="keyword">val</span> scrolls</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALsubmits"><span class="keyword">val</span> submits</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALselects"><span class="keyword">val</span> selects</span> : <code class="type">?cancel_handler:bool -><br>       ?use_capture:bool -><br>       #<a href="Dom_html.eventTarget-c.html">Dom_html.eventTarget</a> <a href="Js.html#TYPEt">Js.t</a> -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALrequest_animation_frame"><span class="keyword">val</span> request_animation_frame</span> : <code class="type">unit -> unit Lwt.t</code></pre><div class="info ">
Returns when a repaint of the window by the browser starts.
    (see JS method <code class="code">window.requestAnimationFrame</code>)<br>
</div>

<pre><span id="VALonload"><span class="keyword">val</span> onload</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre><div class="info ">
Returns when the page is loaded<br>
</div>

<pre><span id="VALdomContentLoaded"><span class="keyword">val</span> domContentLoaded</span> : <code class="type">unit -> unit Lwt.t</code></pre>
<pre><span id="VALonunload"><span class="keyword">val</span> onunload</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonbeforeunload"><span class="keyword">val</span> onbeforeunload</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonresize"><span class="keyword">val</span> onresize</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonorientationchange"><span class="keyword">val</span> onorientationchange</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonpopstate"><span class="keyword">val</span> onpopstate</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonhashchange"><span class="keyword">val</span> onhashchange</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonorientationchange_or_onresize"><span class="keyword">val</span> onorientationchange_or_onresize</span> : <code class="type">unit -> <a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> Lwt.t</code></pre>
<pre><span id="VALonresizes"><span class="keyword">val</span> onresizes</span> : <code class="type">(<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALonorientationchanges"><span class="keyword">val</span> onorientationchanges</span> : <code class="type">(<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALonpopstates"><span class="keyword">val</span> onpopstates</span> : <code class="type">(<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALonhashchanges"><span class="keyword">val</span> onhashchanges</span> : <code class="type">(<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALonorientationchanges_or_onresizes"><span class="keyword">val</span> onorientationchanges_or_onresizes</span> : <code class="type">(<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALlimited_onresizes"><span class="keyword">val</span> limited_onresizes</span> : <code class="type">?elapsed_time:float -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALlimited_onorientationchanges"><span class="keyword">val</span> limited_onorientationchanges</span> : <code class="type">?elapsed_time:float -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre>
<pre><span id="VALlimited_onorientationchanges_or_onresizes"><span class="keyword">val</span> limited_onorientationchanges_or_onresizes</span> : <code class="type">?elapsed_time:float -><br>       (<a href="Dom_html.event-c.html">Dom_html.event</a> <a href="Js.html#TYPEt">Js.t</a> -> unit Lwt.t -> unit Lwt.t) -> unit Lwt.t</code></pre></body></html>