Note
Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.
Clear img.onload to prevent errors for testing.
$ npm install @segment/clear-imagesSets img.onload to an empty function so no errors are thrown in any onload callbacks.
Overrides the window.Image constructor to watch when images are created.
Sets window.Image back to normal.