Socket
Socket
Sign inDemoInstall

@grrr/ready

Package Overview
Dependencies
0
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @grrr/ready

Listener for DOM and document ready and loaded events


Version published
Weekly downloads
6
decreased by-50%
Maintainers
4
Install size
4.47 kB
Created
Weekly downloads
 

Readme

Source

Ready

Build Status

DOM ready & document loaded JavaScript listeners

  • Lightweight (less than 250b minified and gzipped)
  • No dependencies
  • Transpile to desired browser target (syntax only)

Built with ❤️ by GRRR.

Installation

$ npm install @grrr/ready

Note: depending on your setup additional configuration might be needed, since this package is published with untranspiled JavaScript.

Usage

Import into your main JavaScript file:

import { onDocumentLoaded, onDomReady } from '@grrr/ready';

onDomReady(() => {
  // Execute main functions
});

onDocumentLoaded(() => {
  // Execute functions after the document has fully loaded
});

DOM ready

The onDomReady function:

Document loaded

The onDocumentLoaded function:

FAQs

Last updated on 08 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc