Skip to content

varld/document-ready

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Ready

A tiny function that tells you when the document is ready.

Install

# yarn
yarn add @document/ready

# npm
npm install --save @document/ready

Usage

import ready from '@document/ready';

ready(() => {
  console.log('🎉 Whoop whoop. The document is ready');
});

API

ready(cb)

Create a dom ready listener.

cb: () => void

A callback function which will be called when the document is ready.

Returns

Returns a dispose function. If you call it, the listener will be revoked.

License

MIT © Tobias Herber

Made by Varld

About

A tiny document ready listener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published