Actualizar sigpro2.js

This commit is contained in:
2026-04-11 00:32:44 +02:00
parent b168761127
commit 03fe2a1b80

View File

@@ -181,15 +181,9 @@ const validateAttr = (key, val) => {
const Tag = (tag, props = {}, children = []) => { const Tag = (tag, props = {}, children = []) => {
if (props instanceof Node || isArr(props) || !isObj(props)) { children = props; props = {}; } if (props instanceof Node || isArr(props) || !isObj(props)) { children = props; props = {}; }
if (isFunc(tag)) { if (isFunc(tag)) {
const ctx = { const ctx = { _mounts: [], _cleanups: new Set() };
_mounts: [],
_cleanups: new Set(),
};
const effect = createEffect(() => { const effect = createEffect(() => {
const result = tag(props, { const result = tag(props, { children, emit: (ev, ...args) => props[`on${ev[0].toUpperCase()}${ev.slice(1)}`]?.(...args) });
children,
emit: (ev, ...args) => props[`on${ev[0].toUpperCase()}${ev.slice(1)}`]?.(...args)
});
effect._result = result; effect._result = result;
return result; return result;
}); });