填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

MockAnimationDriver

      
      class MockAnimationDriver implements AnimationDriver {
  static log: AnimationPlayer[]
  validateStyleProperty(prop: string): boolean
  matchesElement(element: any, selector: string): boolean
  containsElement(elm1: any, elm2: any): boolean
  query(element: any, selector: string, multi: boolean): any[]
  computeStyle(element: any, prop: string, defaultValue?: string): string
  animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer
}
    

静态属性

属性说明
static log: AnimationPlayer[]

方法

validateStyleProperty(prop: string): boolean
      
      validateStyleProperty(prop: string): boolean
    
参数
prop string
返回值

boolean

matchesElement(element: any, selector: string): boolean
      
      matchesElement(element: any, selector: string): boolean
    
参数
element any
selector string
返回值

boolean

containsElement(elm1: any, elm2: any): boolean
      
      containsElement(elm1: any, elm2: any): boolean
    
参数
elm1 any
elm2 any
返回值

boolean

query(element: any, selector: string, multi: boolean): any[]
      
      query(element: any, selector: string, multi: boolean): any[]
    
参数
element any
selector string
multi boolean
返回值

any[]

computeStyle(element: any, prop: string, defaultValue?: string): string
      
      computeStyle(element: any, prop: string, defaultValue?: string): string
    
参数
element any
prop string
defaultValue string

可选. 默认值是 undefined.

返回值

string

animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer
      
      animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing: string, previousPlayers: any[] = []): MockAnimationPlayer
    
参数
element any
keyframes { [key: string]: string | number; }[]
duration number
delay number
easing string
previousPlayers any[]

可选. 默认值是 [].

返回值

MockAnimationPlayer