refactor: remove requestAnimationFrame from polyfills and platforms (#10528)
This commit is contained in:

committed by
Victor Berchet

parent
24e046fd6a
commit
6e40ef0f6d
@ -397,10 +397,6 @@ export class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
||||
getComputedStyle(element: any /** TODO #9100 */): any { return getComputedStyle(element); }
|
||||
// TODO(tbosch): move this into a separate environment class once we have it
|
||||
setGlobalVar(path: string, value: any) { setValueOnPath(global, path, value); }
|
||||
requestAnimationFrame(callback: any /** TODO #9100 */): number {
|
||||
return window.requestAnimationFrame(callback);
|
||||
}
|
||||
cancelAnimationFrame(id: number) { window.cancelAnimationFrame(id); }
|
||||
supportsWebAnimation(): boolean { return isFunction((<any>Element).prototype['animate']); }
|
||||
performanceNow(): number {
|
||||
// performance.now() is not available in all browsers, see
|
||||
|
@ -177,8 +177,6 @@ export abstract class DomAdapter {
|
||||
abstract getComputedStyle(element: any /** TODO #9100 */): any;
|
||||
abstract getData(element: any /** TODO #9100 */, name: string): string;
|
||||
abstract setGlobalVar(name: string, value: any): any /** TODO #9100 */;
|
||||
abstract requestAnimationFrame(callback: any /** TODO #9100 */): number;
|
||||
abstract cancelAnimationFrame(id: any /** TODO #9100 */): any /** TODO #9100 */;
|
||||
abstract supportsWebAnimation(): boolean;
|
||||
abstract performanceNow(): number;
|
||||
abstract getAnimationPrefix(): string;
|
||||
|
@ -198,8 +198,6 @@ export class WorkerDomAdapter extends DomAdapter {
|
||||
getComputedStyle(element: any /** TODO #9100 */): any { throw 'not implemented'; }
|
||||
getData(element: any /** TODO #9100 */, name: string): string { throw 'not implemented'; }
|
||||
setGlobalVar(name: string, value: any) { throw 'not implemented'; }
|
||||
requestAnimationFrame(callback: any /** TODO #9100 */): number { throw 'not implemented'; }
|
||||
cancelAnimationFrame(id: any /** TODO #9100 */) { throw 'not implemented'; }
|
||||
performanceNow(): number { throw 'not implemented'; }
|
||||
getAnimationPrefix(): string { throw 'not implemented'; }
|
||||
getTransitionEnd(): string { throw 'not implemented'; }
|
||||
|
Reference in New Issue
Block a user