Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createdElement.on(name, parsedAttrs.handlers[name])
}
appendChilds(kids)
createdElement.connectedCallback()
} else {
appendChilds(kids)
createdElement.shouldUpdate(parsedAttrs.props)
}
} else {
let hasNotRenderedChildren = kids && createdElement && createdElement.children.length === 0 && kids.length !== 0
if (hasNotRenderedChildren || !parsedAttrs.attrs['freeze']) {
appendChilds(kids)
}
}
IncrementalDOM.elementClose(tagName.toLowerCase())
IncrementalDOM.currentComponent = null
}
})
return function () {
tagName = tagName.toUpperCase()
kids = cleanUpKids(kids)
var parsedAttrs = parseAttrsObj(props)
if (tagName === 'VIRTUAL') return appendChilds(kids)
if (tagName === 'SLOT' && component.kids[props.name]) {
let slot = component.kids[props.name]
tagName = slot.tagName
props = slot.props
kids = slot.kids
}
if (props.slot) {
let cleanprops = {...props}
delete cleanprops.slot
IncrementalDOM.currentComponent.kids[props.slot] = {
props: cleanprops,
kids: kids,
tagName: tagName
}
return
}
IncrementalDOM.elementOpenStart(tagName.toLowerCase(), parsedAttrs.oid)
for (let key in parsedAttrs.attrs) {
IncrementalDOM.attr(key, parsedAttrs.attrs[key])
}
if (!components[tagName]) {
for (let key in parsedAttrs.props) {
IncrementalDOM.attr(key, parsedAttrs.props[key])
}
for (let key in parsedAttrs.handlers) {
IncrementalDOM.attr('on' + key, parsedAttrs.handlers[key])