
Research
6 Malicious Packagist Themes Ship Trojanized jQuery and FUNNULL Redirect Payloads
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.
element-ready
Advanced tools
Detect when an element is ready in the DOM
$ npm install element-ready
import elementReady from 'element-ready';
const element = await elementReady('#unicorn');
console.log(element.id);
//=> 'unicorn'
Returns a promise for a matching element.
Type: string
Prefix the element type to get a better TypeScript return type. For example, button.my-btn instead of .my-btn.
Type: object
Type: Element | document
Default: document
The element that's expected to contain a match.
Type: boolean
Default: true
Automatically stop checking for the element to be ready after the DOM ready event. The promise is then resolved to undefined.
Type: number
Default: Infinity
Milliseconds to wait before stopping the search and resolving the promise to undefined.
Type: boolean
Default: true
Since the current document’s HTML is downloaded and parsed gradually, elements may appear in the DOM before all of their children are “ready”.
By default, element-ready guarantees the element and all of its children have been parsed. This is useful if you want to interact with them or if you want to .append() something inside.
By setting this to false, element-ready will resolve the promise as soon as it finds the requested selector, regardless of its content. This is ok if you're just checking if the element exists or if you want to read/change its attributes.
Type: Function
Stop checking for the element to be ready. The stop is synchronous and the original promise is then resolved to undefined.
Calling it after the promise has settled or multiple times does nothing.
DOMContentLoadedFAQs
Detect when an element is ready in the DOM
The npm package element-ready receives a total of 13,433 weekly downloads. As such, element-ready popularity was classified as popular.
We found that element-ready demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.

Research
Six malicious Packagist packages posing as OphimCMS themes contain trojanized jQuery that exfiltrates URLs, injects ads, and loads FUNNULL-linked redirects.

Security News
The GCVE initiative operated by CIRCL has officially opened its publishing ecosystem, letting organizations issue and share vulnerability identifiers without routing through a central authority.

Security News
The project is retiring its odd/even release model in favor of a simpler annual cadence where every major version becomes LTS.