forked from TomBers/Eve-Experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event.eve
53 lines (44 loc) · 891 Bytes
/
event.eve
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
remove events
~~~
search @event
c = if event = [#keydown] then event
if event = [#keyup] then event
if event = [#click] then event
if event = [#double-click] then event
if event = [#change] then event
if event = [#blur] then event
if event = [#focus] then event
if event = [#url-change] then event
commit @event
c := none
~~~
hash changes
~~~
search @event
change = [#url-change hash-segment]
hash-segment = [index value]
commit @browser
url = [#url]
url.hash-segment := [index value]
~~~
update values
~~~
search @event
c = [#change element value]
commit @browser
element.value := value
~~~
add checked
~~~
search @event
c = [#change element checked: true]
commit @browser
element.checked := true
~~~
remove checked
~~~
search @event
c = [#change element checked: false]
commit @browser
element.checked := none
~~~