blob: 78bc5e1994230dd76562e3e15cab9cea64f3e4c8 (
plain) (
blame)
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
|
function hoisted1() {
console.log("hoisted");
}
const hoisted2 = () => console.log("hoisted delegated");
const template = (
<div id="main">
<button onchange={() => console.log("bound")}>Change Bound</button>
<button onChange={[(id) => console.log("bound", id), id]}>
Change Bound
</button>
<button onchange={handler}>Change Bound</button>
<button onchange={[handler]}>Change Bound</button>
<button onchange={hoisted1}>Change Bound</button>
<button onclick={() => console.log("delegated")}>Click Delegated</button>
<button onClick={[(id) => console.log("delegated", id), rowId]}>
Click Delegated
</button>
<button onClick={handler}>Click Delegated</button>
<button onClick={[handler]}>Click Delegated</button>
<button onClick={hoisted2}>Click Delegated</button>
<button
on:click={() => console.log("listener")}
on:CAPS-ev={() => console.log("custom")}
>
Click Listener
</button>
<button oncapture:camelClick={() => console.log("listener")}>
Click Capture
</button>
</div>
);
|