idraw/__tests__/polyfill/image.ts
2023-02-12 14:44:56 +08:00

13 lines
272 B
TypeScript

/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-ignore
window.Image = class {
constructor() {
setTimeout(() => {
// @ts-ignore
if (typeof this.onload === 'function') {
// @ts-ignore
this.onload();
}
}, 50);
}
};