@f/domready

Run a function when the DOM is ready

Usage no npm install needed!

<script type="module">
  import fDomready from 'https://cdn.skypack.dev/@f/domready';
</script>

README

domready

Build status Git tag NPM version Code style

Run a function when the DOM is ready

Installation

$ npm install @f/domready

Usage

var domready = require('@f/domready')

domready(function () {
  loadApp()
})

API

domready(fn)

  • fn - The function to run when the DOM is ready. Always invoked asynchronously, even if the DOM is already loaded.

Returns: void

License

MIT