blob: d94c157e44d7b7d3bf1e01bd629a5e864c623b3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
Object.defineProperty(global.HTMLImageElement.prototype, 'src', {
get() {
return this.$_jest_src || this.getAttribute('src');
},
set(val) {
this.$_jest_src = val;
if (this.onload) {
this.onload();
}
},
});
|