Add ref in $html

This commit is contained in:
2026-03-28 16:56:00 +01:00
parent b367b097e6
commit 6d25d3929a
2 changed files with 27 additions and 10 deletions

View File

@@ -226,6 +226,10 @@
el._cleanups = new Set();
for (let [k, v] of Object.entries(props)) {
if (k === "ref") {
typeof v === "function" ? v(el) : (v.current = el);
continue;
}
const isSignal = typeof v === "function";
const isInput = ["INPUT", "TEXTAREA", "SELECT"].includes(el.tagName);
const isBindAttr = (k === "value" || k === "checked");