toBlob is not a constructor

This commit is contained in:
kkapsner 2021-03-06 11:08:55 +01:00
parent 0930928df3
commit 0d581403c1
1 changed files with 5 additions and 0 deletions

View File

@ -359,6 +359,11 @@
object: "HTMLCanvasElement",
fakeGenerator: function(checker){
return function toBlob(callback){
if (this instanceof toBlob){
throw new extension.getWrapped(window).TypeError(
"HTMLCanvasElement.prototype.toBlob is not a constructor"
);
}
return checkerWrapper(checker, this, arguments, useFakeCanvasCallback);
};
},