Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@segment/clear-images

segmentio972SEE 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.

changelog

1.0.0 / 2016-05-30

  • Modernize test harness
  • Remove Duo/component support, add Browserify support