fready

1.0.0 • Public • Published

fready

A minimalistic API for DOMContentLoaded.

  • Your function is run on DOMContentLoaded.
  • If the DOM is ready when you call, your function is executed as soon as possible asynchronously (via setTimeout( fn, 0 )).
  • Detects headless environments like Node.js so your code will still execute.
  • Does not contain fluff for non-standards-compliant browsers.
  • <0.25kB bytes min+gzip
fready( fn ); // runs fn() when the DOM is ready to be manipulated

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    1,526
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1,526

Package Sidebar

Install

npm i fready

Weekly Downloads

1,526

Version

1.0.0

License

MIT

Last publish

Collaborators

  • maxkfranz