Skip to content

Commit

Permalink
feat(PAL): requestAnimationFrame and performance APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jdanyow committed Dec 11, 2015
1 parent 9e6ab74 commit 8427b1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform.js
Expand Up @@ -6,5 +6,9 @@ export const _PLATFORM = {
},
removeEventListener(eventName: string, callback: Function, capture: boolean): void {
this.global.removeEventListener(eventName, callback, capture);
},
performance: window.performance,
requestAnimationFrame(callback: Function): number {
return this.global.requestAnimationFrame(callback);
}
};

1 comment on commit 8427b1f

@Andreas-Hjortland
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this commit breaks IE9 compatibility. I know it is not highly prioritized to make it work with IE9, but you can fix it by either including a polyfill for window.requestAnimationFrame or falling back to setTimeout in the requestAnimationFrame method.

Please sign in to comment.