Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function () {
var createdElement
if (tagName !== 'virtual' || originalTagName) {
// console.log('element open ->', tagName, parsedAttrs.key)
var TagClass = oval.getRegisteredTag(originalTagName || tagName)
if (!TagClass) {
IncrementalDOM.elementOpenStart(tagName, parsedAttrs.key, parsedAttrs.staticAttrs)
for (var key in parsedAttrs.attrs) {
IncrementalDOM.attr(key, parsedAttrs.attrs[key])
}
} else {
IncrementalDOM.elementOpenStart(tagName, parsedAttrs.key)
}
createdElement = IncrementalDOM.elementOpenEnd()
if (parsedAttrs.attrs['ref']) {
tag.refs[parsedAttrs.attrs['ref']] = createdElement
}
if (parsedAttrs.attrs['freeze']) {
IncrementalDOM.skip()
}
if (createdElement.tag) {
if (!createdElement.tag.shouldRender) {
IncrementalDOM.skip()
} else {
createdElement.tag.update(children, parsedAttrs.props, parsedAttrs.attrs)
}
IncrementalDOM.elementClose(tagName)
tag.childTags.push(createdElement.tag)
return function () {
var createdElement
if (tagName !== 'virtual' || originalTagName) {
// console.log('element open ->', tagName, parsedAttrs.key)
var TagClass = oval.getRegisteredTag(originalTagName || tagName)
if (!TagClass) {
IncrementalDOM.elementOpenStart(tagName, parsedAttrs.key, parsedAttrs.staticAttrs)
for (var key in parsedAttrs.attrs) {
IncrementalDOM.attr(key, parsedAttrs.attrs[key])
}
} else {
IncrementalDOM.elementOpenStart(tagName, parsedAttrs.key)
}
createdElement = IncrementalDOM.elementOpenEnd()
if (parsedAttrs.attrs['ref']) {
tag.refs[parsedAttrs.attrs['ref']] = createdElement
}
if (parsedAttrs.attrs['freeze']) {
IncrementalDOM.skip()
}
if (createdElement.tag) {
if (!createdElement.tag.shouldRender) {
IncrementalDOM.skip()
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])
}
}
let createdElement = IncrementalDOM.elementOpenEnd()
if (parsedAttrs.attrs['freeze']) {
IncrementalDOM.skip()
}
if (components[tagName]) {