diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-06-11 18:24:43 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-06-11 18:24:57 +0100 |
commit | e59a118aae32fb75e28b847e9028109052e7475b (patch) | |
tree | dd11eaef3b3cb00c6f39b4b5e4c479b9e5eb886c /priv/static/lustre-server-component.mjs | |
parent | 13118c9eefe6587f044d48b15630898b726d63ea (diff) | |
download | lustre-e59a118aae32fb75e28b847e9028109052e7475b.tar.gz lustre-e59a118aae32fb75e28b847e9028109052e7475b.zip |
:wrench: Generate server component client runtime.
Diffstat (limited to 'priv/static/lustre-server-component.mjs')
-rw-r--r-- | priv/static/lustre-server-component.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/priv/static/lustre-server-component.mjs b/priv/static/lustre-server-component.mjs index 8927156..2f2e868 100644 --- a/priv/static/lustre-server-component.mjs +++ b/priv/static/lustre-server-component.mjs @@ -158,7 +158,7 @@ function createElementNode({ prev, next, dispatch, stack }) { } else if (name === "dangerous-unescaped-html") { innerHTML = value; } else { - if (typeof value === "string") + if (el2.getAttribute(name) !== value) el2.setAttribute(name, value); if (name === "value" || name === "selected") el2[name] = value; @@ -243,7 +243,7 @@ function lustreGenericEventHandler(event2) { handlersForEventTarget.get(event2.type)(event2); } function lustreServerEventHandler(event2) { - const el2 = event2.target; + const el2 = event2.currentTarget; const tag = el2.getAttribute(`data-lustre-on-${event2.type}`); const data = JSON.parse(el2.getAttribute("data-lustre-data") || "{}"); const include = JSON.parse(el2.getAttribute("data-lustre-include") || "[]"); |