Package detail

@segment/clear-images

segmentio1.7kSEE LICENSE IN LICENSE1.0.0

Clear img.onload to prevent errors for testing

img, testing

readme

clear-images

CircleCI Codecov

Clear img.onload to prevent errors for testing.

Installation

$ npm install @segment/clear-images

API

clearImages()

Sets img.onload to an empty function so no errors are thrown in any onload callbacks.

.bind()

Overrides the window.Image constructor to watch when images are created.

.unbind()

Sets window.Image back to normal.