Skip to content
No description, website, or topics provided.
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Nov 30, 2016
LICENSE Initial commit Nov 30, 2016
README.md Typo fix in the README.md Nov 30, 2016
index.android.js Initial commit Nov 30, 2016
index.android.js.map Initial commit Nov 30, 2016
index.android.ts Initial commit Nov 30, 2016
index.d.ts Initial commit Nov 30, 2016
index.ios.js
index.ios.js.map Initial commit Nov 30, 2016
index.ios.ts Initial commit Nov 30, 2016
package.json 1.0.1 Nov 30, 2016
reference.d.ts Initial commit Nov 30, 2016
tsconfig.json Initial commit Nov 30, 2016

README.md

A NativeScript plugin that lets you to post a callback to be executed when the application is in relatively idle state. This can be used to schedule short-lived tasks that have to be executed on the main thread but are not critical and can be postponed for times when the user is not interacting with the application.

For example:

import { requestIdleFrame } from "nativescript-idle";

requestIdleFrame(() => {
    var msg = "preloading " + route.path;
    console.log(msg);
    var start = Date.now();
    // Task taking ~40ms.
    load();
    this.loadedPaths.push(route.path);
    var end = Date.now();
    console.log(msg + " in " + (end - start));
});
You can’t perform that action at this time.