Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

GoogleChromeLabs/idlize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 23, 2018
836cbc2 · Oct 23, 2018

History

12 Commits
Sep 22, 2018
Sep 20, 2018
Sep 19, 2018
Sep 19, 2018
Sep 19, 2018
Oct 23, 2018
Sep 19, 2018
Sep 20, 2018
Sep 20, 2018
Sep 19, 2018
Sep 23, 2018
Sep 20, 2018
Sep 20, 2018
Oct 23, 2018
Sep 19, 2018
Oct 23, 2018

Repository files navigation

Idlize

Helper classes and methods make it easier for developers to implement the idle-until-urgent pattern and leverage the requestIdleCallback() API.

Installation

You can install this library from npm by running:

npm install idlize

Usage

This library is a collection of helper methods and classes (not a single bundle). As such, each helper should be imported separately. All public helpers are released at the level of the project, so they can be imported by directly referencing the helper's .mjs file.

import {defineIdleProperty} from 'idlize/defineIdleProperty.mjs'
import {defineIdleProperties} from 'idlize/defineIdleProperties.mjs'
import {cIC, rIC} from 'idlize/idle-callback-polyfills.mjs'
import {IdleQueue} from 'idlize/IdleQueue.mjs'
import {IdleValue} from 'idlize/IdleValue.mjs'

Refer to each helper's documentation for examples and API usage details:

Browser Support

Chrome
Firefox
Safari
Edge
Internet Explorer
9+
Opera

This code has been tested and known to work in all major browsers as well as Internet Explorer back to version 9.

License

Apache 2.0