Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dom-loaded

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-loaded

Check when the DOM has loaded like `DOMContentLoaded`

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
417
decreased by-46.12%
Maintainers
1
Weekly downloads
 
Created
Source

dom-loaded

Check when the DOM has loaded like DOMContentLoaded

Unlike DOMContentLoaded, this also works when included after the DOM was loaded.

Install

npm install dom-loaded

Usage

import domLoaded from 'dom-loaded';

await domLoaded;
console.log('The DOM is now loaded.');

API

domLoaded

Type: Promise<void>

The promise resolves when the DOM finishes loading or right away if the DOM has already loaded.

domLoaded.hasLoaded

Type: boolean

Synchronously check if the DOM has already finished loading.

domLoaded.signal

Type: AbortSignal

An AbortSignal that triggers when the DOM finishes loading or immediately if it has already loaded.

  • element-ready - Detect when an element is ready in the DOM

Keywords

FAQs

Package last updated on 21 Aug 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc