New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@awaitbox/window-loaded

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awaitbox/window-loaded - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "@awaitbox/window-loaded",
"version": "1.0.1",
"version": "1.0.2",
"main": "src/index.js",

@@ -5,0 +5,0 @@ "esnext": "src/index.js",

/**
* Await for the DOM's sub-resources to have been loaded (images, scripts,
* etc). This corresponds to the `window`'s "load" event.
*
* @example
* ```js
* async function main() {
* await windowLoaded()
* console.log('Window loaded!')
* }
* main()
* ```
*/
export default
async function windowLoaded() {
async function windowLoaded( _passThrough ) {
if (document.readyState !== 'complete') {

@@ -21,2 +13,4 @@ await new Promise(function(resolve) {

}
return _passThrough
}
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