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

@mrhenry/custom-elements-helpers

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mrhenry/custom-elements-helpers - npm Package Compare versions

Comparing version 2.5.8 to 2.6.0

2

package.json
{
"name": "@mrhenry/custom-elements-helpers",
"version": "2.5.8",
"version": "2.6.0",
"description": "A collection of Custom Elements v1 helpers",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

export default function waitForDOMReady() {
return new Promise((resolve) => {
if (document.readyState === 'complete') {
resolve();
} else {
const handler = function () {
if (document.readyState === 'complete') {
document.removeEventListener('readystatechange', handler, false);
resolve();
}
};
return new Promise(resolve => {
if (isInteractive()) {
resolve();
} else {
const handler = function() {
if (isInteractive()) {
document.removeEventListener("readystatechange", handler, false);
resolve();
}
};
document.addEventListener('readystatechange', handler, false);
}
});
document.addEventListener("readystatechange", handler, false);
}
});
}
function isInteractive() {
return (
document.readyState === "complete" || document.readyState === "interactive"
);
}
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