debian-mirror-gitlab/spec/frontend/helpers/dom_shims/image_element_properties.js

13 lines
209 B
JavaScript
Raw Normal View History

2020-04-08 14:13:33 +05:30
Object.defineProperty(global.HTMLImageElement.prototype, 'src', {
get() {
return this.$_jest_src;
},
set(val) {
this.$_jest_src = val;
if (this.onload) {
this.onload();
}
},
});