-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSharp.Event.html
More file actions
53 lines (49 loc) · 4.56 KB
/
Sharp.Event.html
File metadata and controls
53 lines (49 loc) · 4.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!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="Sharp.Core.html">
<link rel="next" href="Sharp.Form.html">
<link rel="Up" href="Sharp.html">
<link title="Index of types" rel=Appendix href="index_types.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="Sharp" rel="Chapter" href="Sharp.html">
<link title="Sharp_core" rel="Chapter" href="Sharp_core.html">
<link title="Sharp_event" rel="Chapter" href="Sharp_event.html">
<link title="Sharp_form" rel="Chapter" href="Sharp_form.html">
<link title="Sharp_vdom" rel="Chapter" href="Sharp_vdom.html">
<link title="Sharp_vdom_subnetwork" rel="Chapter" href="Sharp_vdom_subnetwork.html">
<link title="Sharp_router" rel="Chapter" href="Sharp_router.html">
<link title="Sharp_ticker" rel="Chapter" href="Sharp_ticker.html"><title>Sharp.Event</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Sharp.Core.html" title="Sharp.Core">Previous</a>
<a class="up" href="Sharp.html" title="Sharp">Up</a>
<a class="post" href="Sharp.Form.html" title="Sharp.Form">Next</a>
</div>
<h1>Module <a href="type_Sharp.Event.html">Sharp.Event</a></h1>
<pre><span class="keyword">module</span> Event: <code class="type"><a href="Sharp_event.html">Sharp_event</a></code></pre><hr width="100%">
<pre><span id="VALmake"><span class="keyword">val</span> make</span> : <code class="type">?prevent_default:bool -><br> (#Dom_html.event as 'a) Js.t Dom.Event.typ -><br> ((#Dom_html.eventTarget as 'b) Js.t -> 'a Js.t -> 'c option) -><br> 'b Js.t -> 'c option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre><div class="info ">
Create a signal from a JS event on a DOM element.
<p>
The callback receives the event target and the event itself and returns
a value only if the signal should take a value.
It returns the signal as well as a function which unbinds the signal when
called.<br>
</div>
<pre><span id="VALmake_unit"><span class="keyword">val</span> make_unit</span> : <code class="type">?prevent_default:bool -><br> #Dom_html.event Js.t Dom.Event.typ -><br> #Dom_html.eventTarget Js.t -> unit option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre><div class="info ">
A convenient specialised version of <code class="code">make</code> for signals that always take the
unit value.<br>
</div>
<pre><span id="VALclick"><span class="keyword">val</span> click</span> : <code class="type">?prevent_default:bool -><br> #Dom_html.eventTarget Js.t -> unit option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre>
<pre><span id="VALsubmit"><span class="keyword">val</span> submit</span> : <code class="type">?prevent_default:bool -><br> #Dom_html.eventTarget Js.t -> unit option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre>
<pre><span id="VALchange"><span class="keyword">val</span> change</span> : <code class="type">?prevent_default:bool -><br> ((#Dom_html.eventTarget as 'a) Js.t -> Dom_html.event Js.t -> 'b option) -><br> 'a Js.t -> 'b option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre>
<pre><span id="VALinput"><span class="keyword">val</span> input</span> : <code class="type">?prevent_default:bool -><br> ((#Dom_html.eventTarget as 'a) Js.t -> Dom_html.event Js.t -> 'b option) -><br> 'a Js.t -> 'b option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre>
<pre><span id="VALhashchange"><span class="keyword">val</span> hashchange</span> : <code class="type">?prevent_default:bool -><br> (Dom_html.window Js.t -> Dom_html.hashChangeEvent Js.t -> 'a option) -><br> 'a option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre>
<pre><span id="VALpopstate"><span class="keyword">val</span> popstate</span> : <code class="type">?prevent_default:bool -><br> (Dom_html.window Js.t -> Dom_html.popStateEvent Js.t -> 'a option) -><br> 'a option <a href="Sharp_core.html#TYPEt">Sharp_core.t</a> * (unit -> unit)</code></pre></body></html>