mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
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:
committed by
Alexander Vakrilov
parent
0ffc790d82
commit
2aa6e9bf92
@@ -1,6 +1,7 @@
|
||||
import "./core";
|
||||
|
||||
import "./polyfills/timers";
|
||||
import "./polyfills/animation";
|
||||
import "./polyfills/dialogs";
|
||||
import "./polyfills/xhr";
|
||||
import "./polyfills/fetch";
|
||||
|
||||
5
nativescript-core/globals/polyfills/animation/animation.d.ts
vendored
Normal file
5
nativescript-core/globals/polyfills/animation/animation.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* Installs animations polyfill.
|
||||
* @module "globals/polyfills/animations"
|
||||
*/ /** */
|
||||
import "../../core";
|
||||
@@ -0,0 +1,6 @@
|
||||
import "../../core";
|
||||
import { installPolyfills } from "../polyfill-helpers";
|
||||
|
||||
global.registerModule("animation", () => require("../../../animation-frame"));
|
||||
|
||||
installPolyfills("animation", ["requestAnimationFrame", "cancelAnimationFrame"]);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "animation",
|
||||
"main": "animation",
|
||||
"types": "animation.d.ts",
|
||||
"nativescript": {}
|
||||
}
|
||||
Reference in New Issue
Block a user