Call a callback when an image has loaded - adapted from desandro/imagesloaded
Call a callback when an image has loaded - adapted from desandro/imagesloaded, minus the jQuery.
npm install image-loaded
var loaded = require'image-loaded'var image = documentgetElementById'hidden-image'loadedimage// image is loaded!
If the image was already loaded beforehand, the callback will be called
instantly with the second argument set to
true. Otherwise this will be