feat: support requestAnimationFrame (#8112)

* feat: support requestAnimationFrame

* add native helpers to measure time

* test(animation-frame): add tests

* chore: refactor animation-frame to its own module

* chore: fix tslint
This commit is contained in:
Eduardo Speroni
2019-11-29 06:17:26 -03:00
committed by Alexander Vakrilov
parent 0ffc790d82
commit 2aa6e9bf92
12 changed files with 209 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import "./core";
import "./polyfills/timers";
import "./polyfills/animation";
import "./polyfills/dialogs";
import "./polyfills/xhr";
import "./polyfills/fetch";

View File

@@ -0,0 +1,5 @@
/**
* Installs animations polyfill.
* @module "globals/polyfills/animations"
*/ /** */
import "../../core";

View File

@@ -0,0 +1,6 @@
import "../../core";
import { installPolyfills } from "../polyfill-helpers";
global.registerModule("animation", () => require("../../../animation-frame"));
installPolyfills("animation", ["requestAnimationFrame", "cancelAnimationFrame"]);

View File

@@ -0,0 +1,6 @@
{
"name": "animation",
"main": "animation",
"types": "animation.d.ts",
"nativescript": {}
}