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