GoogleChromeLabs / Idlize
Licence: apache-2.0
Helper classes and methods for implementing the idle-until-urgent pattern
Stars: ✭ 937
Programming Languages
javascript
184084 projects - #8 most used programming language
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:
defineIdleProperty.mjs
defineIdleProperties.mjs
idle-callback-polyfills.mjs
IdleQueue.mjs
IdleValue.mjs
Browser Support
✔ |
✔ |
✔ |
✔ |
9+ |
✔ |
This code has been tested and known to work in all major browsers as well as Internet Explorer back to version 9.
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].