Interface RendererOptions<HostNode, HostElement>
interface RendererOptions { cloneNode?(node): HostNode; createComment(text): HostNode; createElement(type,
isSVG?,
isCustomizedBuiltIn?,
vnodeProps?): HostElement; createText(text): HostNode; insert(el,
parent,
anchor?): void; insertStaticContent?(content,
parent,
anchor,
isSVG,
start?,
end?): [HostNode, HostNode]; nextSibling(node): null | HostNode; parentNode(node): null | HostElement; patchProp(el,
key,
prevValue,
nextValue,
isSVG?,
prevChildren?,
parentComponent?,
parentSuspense?,
unmountChildren?): void; querySelector?(selector): null | HostElement; remove(el): void; setElementText(node,
text): void; setScopeId?(el,
id): void; setText(node,
text): void; } Methods
Optional
cloneNode
- cloneNode(node): HostNode
Returns HostNode
createComment
- createComment(text): HostNode
Returns HostNode
createElement
- createElement(type, isSVG?, isCustomizedBuiltIn?, vnodeProps?): HostElement
Parameters
type: string
Optional
isSVG: boolean
Optional
isCustomizedBuiltIn: string
Optional
vnodeProps: null | VNodeProps & {
[key: string]: any;
}
Returns HostElement
createText
- createText(text): HostNode
Returns HostNode
insert
- insert(el, parent, anchor?): void
Parameters
el: HostNode
parent: HostElement
Optional
anchor: null | HostNode
Returns void
Optional
insertStaticContent
- insertStaticContent(content, parent, anchor, isSVG, start?, end?): [HostNode, HostNode]
Parameters
content: string
parent: HostElement
anchor: null | HostNode
isSVG: boolean
Optional
start: null | HostNode
Optional
end: null | HostNode
Returns [HostNode, HostNode]
nextSibling
- nextSibling(node): null | HostNode
Returns null | HostNode
parentNode
- parentNode(node): null | HostElement
Returns null | HostElement
patchProp
- patchProp(el, key, prevValue, nextValue, isSVG?, prevChildren?, parentComponent?, parentSuspense?, unmountChildren?): void
Parameters
el: HostElement
key: string
prevValue: any
nextValue: any
Optional
isSVG: boolean
Optional
prevChildren: VNode<HostNode, HostElement, {
[key: string]: any;
}>[]
Optional
unmountChildren: UnmountChildrenFn
Returns void
Optional
querySelector
- querySelector(selector): null | HostElement
Returns null | HostElement
remove
- remove(el): void
Returns void
setElementText
- setElementText(node, text): void
Parameters
node: HostElement
text: string
Returns void
Optional
setScopeId
- setScopeId(el, id): void
Parameters
el: HostElement
id: string
Returns void
setText
- setText(node, text): void
Parameters
node: HostNode
text: string
Returns void