debian-mirror-gitlab/spec/frontend/helpers/dom_shims/image_element_properties.js
2020-04-08 14:13:33 +05:30

12 lines
209 B
JavaScript

Object.defineProperty(global.HTMLImageElement.prototype, 'src', {
get() {
return this.$_jest_src;
},
set(val) {
this.$_jest_src = val;
if (this.onload) {
this.onload();
}
},
});