1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-06-23 20:12:45 +02:00

Modified functions need type.

Fixes #109
This commit is contained in:
kkapsner 2017-03-03 00:55:32 +01:00
parent f85303065c
commit e55d0078d5

View File

@ -87,6 +87,7 @@
// changed functions and their fakes
exports.changedFunctions = {
getContext: {
type: "context",
getStatus: function(obj, status){
if (hasType(status, "internal")){
return {
@ -118,6 +119,7 @@
}
},
toDataURL: {
type: "readout",
getStatus: function(obj, status){
var status = Object.create(status);
if (hasType(status, "input")){
@ -139,6 +141,7 @@
}
},
toBlob: {
type: "readout",
getStatus: function(obj, status){
var status = Object.create(status);
if (hasType(status, "input")){
@ -161,6 +164,7 @@
exportOptions: {allowCallbacks: true}
},
mozGetAsFile: {
type: "readout",
getStatus: function(obj, status){
var status = Object.create(status);
if (hasType(status, "input")){
@ -182,6 +186,7 @@
}
},
getImageData: {
type: "readout",
getStatus: function(obj, status){
var status = Object.create(status);
if (hasType(status, "input")){
@ -213,6 +218,7 @@
}
},
fillText: {
type: "input",
getStatus: function(obj, status){
var status = Object.create(status);
status.active = hasType(status, "input");
@ -232,6 +238,7 @@
}
},
strokeText: {
type: "input",
getStatus: function(obj, status){
var status = Object.create(status);
status.active = hasType(status, "input");
@ -251,6 +258,7 @@
}
},
readPixels: {
type: "readout",
getStatus: function(obj, status){
var status = Object.create(status);
status.active = hasType(status, "readout") || hasType(status, "input");