Renderer

弃用说明

Use the Renderer2 instead.

abstract class Renderer { abstract selectRootElement(selectorOrNode: string | any, debugInfo?: RenderDebugInfo): any abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any abstract createViewRoot(hostElement: any): any abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any abstract projectNodes(parentElement: any, nodes: any[]): void abstract attachViewAfter(node: any, viewRootNodes: any[]): void abstract detachView(viewRootNodes: any[]): void abstract destroyView(hostElement: any, viewAllNodes: any[]): void abstract listen(renderElement: any, name: string, callback: Function): Function abstract listenGlobal(target: string, name: string, callback: Function): Function abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): void abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void abstract setText(renderNode: any, text: string): void abstract animate(element: any, startingStyles: any, keyframes: any[], duration: number, delay: number, easing: string, previousPlayers?: any[]): any }

方法

abstract selectRootElement(selectorOrNode: string | any, debugInfo?: RenderDebugInfo): any

参数

selectorOrNode

Type: string | any.

debugInfo

Type: RenderDebugInfo.

可选. 默认值是 undefined.

返回值

any

abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any

参数

parentElement

Type: any.

name

Type: string.

debugInfo

Type: RenderDebugInfo.

可选. 默认值是 undefined.

返回值

any

abstract createViewRoot(hostElement: any): any

参数

hostElement

Type: any.

返回值

any

abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any

参数

parentElement

Type: any.

debugInfo

Type: RenderDebugInfo.

可选. 默认值是 undefined.

返回值

any

abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any

参数

parentElement

Type: any.

value

Type: string.

debugInfo

Type: RenderDebugInfo.

可选. 默认值是 undefined.

返回值

any

abstract projectNodes(parentElement: any, nodes: any[]): void

参数

parentElement

Type: any.

nodes

Type: any[].

返回值

void

abstract attachViewAfter(node: any, viewRootNodes: any[]): void

参数

node

Type: any.

viewRootNodes

Type: any[].

返回值

void

abstract detachView(viewRootNodes: any[]): void

参数

viewRootNodes

Type: any[].

返回值

void

abstract destroyView(hostElement: any, viewAllNodes: any[]): void

参数

hostElement

Type: any.

viewAllNodes

Type: any[].

返回值

void

abstract listen(renderElement: any, name: string, callback: Function): Function

参数

renderElement

Type: any.

name

Type: string.

callback

Type: Function.

返回值

Function

abstract listenGlobal(target: string, name: string, callback: Function): Function

参数

target

Type: string.

name

Type: string.

callback

Type: Function.

返回值

Function

abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void

参数

renderElement

Type: any.

propertyName

Type: string.

propertyValue

Type: any.

返回值

void

abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string): void

参数

renderElement

Type: any.

attributeName

Type: string.

attributeValue

Type: string.

返回值

void

Used only in debug mode to serialize property changes to dom nodes as attributes.

abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void

参数

renderElement

Type: any.

propertyName

Type: string.

propertyValue

Type: string.

返回值

void

abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void

参数

renderElement

Type: any.

className

Type: string.

isAdd

Type: boolean.

返回值

void

abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): void

参数

renderElement

Type: any.

styleName

Type: string.

styleValue

Type: string.

返回值

void

abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): void

参数

renderElement

Type: any.

methodName

Type: string.

args

Type: any[].

可选. 默认值是 undefined.

返回值

void

abstract setText(renderNode: any, text: string): void

参数

renderNode

Type: any.

text

Type: string.

返回值

void

abstract animate(element: any, startingStyles: any, keyframes: any[], duration: number, delay: number, easing: string, previousPlayers?: any[]): any

参数

element

Type: any.

startingStyles

Type: any.

keyframes

Type: any[].

duration

Type: number.

delay

Type: number.

easing

Type: string.

previousPlayers

Type: any[].

可选. 默认值是 undefined.

返回值

any