diff options
Diffstat (limited to 'test/bun.js/solid-dom-fixtures/eventExpressions/code.js')
-rw-r--r-- | test/bun.js/solid-dom-fixtures/eventExpressions/code.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/bun.js/solid-dom-fixtures/eventExpressions/code.js b/test/bun.js/solid-dom-fixtures/eventExpressions/code.js new file mode 100644 index 000000000..78bc5e199 --- /dev/null +++ b/test/bun.js/solid-dom-fixtures/eventExpressions/code.js @@ -0,0 +1,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> +); |