AnimationDriver

abstract class AnimationDriver { static NOOP: AnimationDriver abstract validateStyleProperty(prop: string): boolean abstract matchesElement(element: any, selector: string): boolean abstract containsElement(elm1: any, elm2: any): boolean abstract query(element: any, selector: string, multi: boolean): any[] abstract computeStyle(element: any, prop: string, defaultValue?: string): string abstract animate(element: any, keyframes: {...}, duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any }

静态属性

属性名类型说明
NOOP

方法

abstract validateStyleProperty(prop: string): boolean

参数

prop

Type: string.

返回值

boolean

abstract matchesElement(element: any, selector: string): boolean

参数

element

Type: any.

selector

Type: string.

返回值

boolean

abstract containsElement(elm1: any, elm2: any): boolean

参数

elm1

Type: any.

elm2

Type: any.

返回值

boolean

abstract query(element: any, selector: string, multi: boolean): any[]

参数

element

Type: any.

selector

Type: string.

multi

Type: boolean.

返回值

any[]

abstract computeStyle(element: any, prop: string, defaultValue?: string): string

参数

element

Type: any.

prop

Type: string.

defaultValue

Type: string.

可选. 默认值是 undefined.

返回值

string

abstract animate(element: any, keyframes: { [key: string]: string | number; }[], duration: number, delay: number, easing?: string | null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any

参数

element

Type: any.

keyframes

Type: { [key: string]: string | number; }[].

duration

Type: number.

delay

Type: number.

easing

Type: string | null.

可选. 默认值是 undefined.

previousPlayers

Type: any[].

可选. 默认值是 undefined.

scrubberAccessRequested

Type: boolean.

可选. 默认值是 undefined.

返回值

any