
package.build.modules.props.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snabbdom Show documentation
Show all versions of snabbdom Show documentation
A virtual DOM library with focus on simplicity, modularity, powerful features and performance.
The newest version!
function updateProps(oldVnode, vnode) {
let key;
let cur;
let old;
const elm = vnode.elm;
let oldProps = oldVnode.data.props;
let props = vnode.data.props;
if (!oldProps && !props)
return;
if (oldProps === props)
return;
oldProps = oldProps || {};
props = props || {};
for (key in props) {
cur = props[key];
old = oldProps[key];
if (old !== cur && (key !== "value" || elm[key] !== cur)) {
elm[key] = cur;
}
}
}
export const propsModule = { create: updateProps, update: updateProps };
//# sourceMappingURL=props.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy