Renderer

已弃用: Use the Renderer2 instead.

abstract class Renderer { abstract selectRootElement(selectorOrNode: 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 class Renderer {
  abstract selectRootElement(selectorOrNode: 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: any, debugInfo?: RenderDebugInfo): any
      
      abstract selectRootElement(selectorOrNode: any, debugInfo?: RenderDebugInfo): any
    
参数
selectorOrNode any
debugInfo RenderDebugInfo

可选. 默认值是 undefined.

返回值

any

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

可选. 默认值是 undefined.

返回值

any

abstract createViewRoot(hostElement: any): any
      
      abstract createViewRoot(hostElement: any): any
    
参数
hostElement any
返回值

any

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

可选. 默认值是 undefined.

返回值

any

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

可选. 默认值是 undefined.

返回值

any

abstract projectNodes(parentElement: any, nodes: any[]): void
      
      abstract projectNodes(parentElement: any, nodes: any[]): void
    
参数
parentElement any
nodes any[]
返回值

void

abstract attachViewAfter(node: any, viewRootNodes: any[]): void
      
      abstract attachViewAfter(node: any, viewRootNodes: any[]): void
    
参数
node any
viewRootNodes any[]
返回值

void

abstract detachView(viewRootNodes: any[]): void
      
      abstract detachView(viewRootNodes: any[]): void
    
参数
viewRootNodes any[]
返回值

void

abstract destroyView(hostElement: any, viewAllNodes: any[]): void
      
      abstract destroyView(hostElement: any, viewAllNodes: any[]): void
    
参数
hostElement any
viewAllNodes any[]
返回值

void

abstract listen(renderElement: any, name: string, callback: Function): Function
      
      abstract listen(renderElement: any, name: string, callback: Function): Function
    
参数
renderElement any
name string
callback Function
返回值

Function

abstract listenGlobal(target: string, name: string, callback: Function): Function
      
      abstract listenGlobal(target: string, name: string, callback: Function): Function
    
参数
target string
name string
callback Function
返回值

Function

abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void
      
      abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void
    
参数
renderElement any
propertyName string
propertyValue any
返回值

void

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

可选. 默认值是 undefined.

返回值

void

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

abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void
      
      abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string): void
    
参数
renderElement any
propertyName string
propertyValue string
返回值

void

abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void
      
      abstract setElementClass(renderElement: any, className: string, isAdd: boolean): void
    
参数
renderElement any
className string
isAdd boolean
返回值

void

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

可选. 默认值是 undefined.

返回值

void

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

可选. 默认值是 undefined.

返回值

void

abstract setText(renderNode: any, text: string): void
      
      abstract setText(renderNode: any, text: string): void
    
参数
renderNode any
text string
返回值

void

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

可选. 默认值是 undefined.

返回值

any