Skip to content

Commit

Permalink
Remove Image.prototype.src getter/setter readonly protections.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHeaps committed Jan 14, 2025
1 parent 77ee2c0 commit baee303
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ window.__firefox__.execute(function($) {
delete Image.prototype.src;

Object.defineProperty(Image.prototype, "src", {
get: $(function() {
get: function() {
return originalImageSrc.get.call(this);
}),
},

set: $(function(value) {
set: function(value) {
// Only attach the `error` event listener once for this
// Image instance.
if (!this[localErrorHandlerProp]) {
Expand All @@ -184,7 +184,7 @@ window.__firefox__.execute(function($) {
}

originalImageSrc.set.call(this, value);
}),
},
enumerable: true,
configurable: true
});
Expand Down

0 comments on commit baee303

Please sign in to comment.