aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-20 00:45:51 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-20 00:45:51 -0700
commit99d61877d6f411f33e0db578f04b333fb2110ddd (patch)
tree8802bd59e55c8ed3b5eec695209e59fd28ddfef4 /integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js
parent224cfa91fb550d3acb5d5fefdcc0594d7a12f1dc (diff)
downloadbun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.gz
bun-99d61877d6f411f33e0db578f04b333fb2110ddd.tar.zst
bun-99d61877d6f411f33e0db578f04b333fb2110ddd.zip
[solid] more progress, no fragments, but still not right
Diffstat (limited to 'integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js')
-rw-r--r--integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js b/integration/bunjs-only-snippets/solid-dom-fixtures/eventExpressions/code.js
new file mode 100644
index 000000000..78bc5e199
--- /dev/null
+++ b/integration/bunjs-only-snippets/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>
+);