1.2.26 add style option to h()
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s

This commit is contained in:
2026-04-29 16:54:54 +02:00
parent 771f4a9f83
commit 0df4b3912d
7 changed files with 24 additions and 7 deletions

7
dist/sigpro.esm.js vendored
View File

@@ -314,6 +314,8 @@ var h = (tag, props = {}, children = []) => {
el.className = val || "";
else if (val == null)
el.removeAttribute(k);
else if (k === "style" && typeof val === "string")
el.setAttribute("style", val);
else if (k in el && !isSVG)
el[k] = val;
else
@@ -329,7 +331,9 @@ var h = (tag, props = {}, children = []) => {
} else {
const val = validateAttr(k, v);
if (val != null) {
if (k in el && !isSVG)
if (k === "style" && typeof val === "string")
el.setAttribute("style", val);
else if (k in el && !isSVG)
el[k] = val;
else
el.setAttribute(k, val === true ? "" : val);
@@ -519,6 +523,7 @@ export {
when,
watch,
router,
onUnmount,
mount,
h,
each,