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

images-loaded

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

images-loaded

Wait for images to load using promises

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

images-loaded Build Status

Wait for images to load using promises

Install

$ npm install --save images-loaded

Usage

const imagesLoaded = require('images-loaded');

imagesLoaded('.container').then(elements => {
	// images are hot and ready
});

API

imagesLoaded(input [, options])

Returns a Promise when all images are done loading, with or without errors.

input

Type: string Element NodeList

A container or list of elements to watch for loading images.

options

Type: Object

props

Type: string[]
Default: []

Can be passed a list of DOM style camelCase properties to check. For example, backgroundImage, borderImage, etc.

attrs

Type: string[]
Default: []

Can be passed a list of attributes to check, such as poster in a video tag.

Browser Support

If your browser supports Promise then 🎉. Check it at caniuse.com.

License

MIT © Alex Cross

Keywords

FAQs

Package last updated on 27 Mar 2018

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