1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2025-03-11 18:52:42 +01:00

Unknown classes might break CB

Fixes #267
This commit is contained in:
kkapsner 2018-09-20 22:46:45 +02:00
parent 70b8d50c56
commit ecc55ad13f
2 changed files with 22 additions and 16 deletions

View File

@ -195,8 +195,8 @@
scope.changedGetters = [ scope.changedGetters = [
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRect.prototype;}, function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "x", name: "x",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -218,8 +218,8 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRect.prototype;}, function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "y", name: "y",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -241,8 +241,8 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRect.prototype;}, function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "width", name: "width",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -264,8 +264,8 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRect.prototype;}, function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "height", name: "height",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -287,7 +287,7 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "left", name: "left",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -302,7 +302,7 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "right", name: "right",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -316,7 +316,7 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "top", name: "top",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -330,7 +330,7 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;} function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
], ],
name: "bottom", name: "bottom",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -344,7 +344,9 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;} function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
], ],
name: "intersectionRect", name: "intersectionRect",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -363,7 +365,9 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;} function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
], ],
name: "boundingClientRect", name: "boundingClientRect",
getterGenerator: function(checker){ getterGenerator: function(checker){
@ -382,7 +386,9 @@
}, },
{ {
objectGetters: [ objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;} function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
], ],
name: "rootBounds", name: "rootBounds",
getterGenerator: function(checker){ getterGenerator: function(checker){

View File

@ -17,7 +17,7 @@
scope.changedGetters = [ scope.changedGetters = [
{ {
objectGetters: [function(window){return window.History.prototype;}], objectGetters: [function(window){return window.History && window.History.prototype;}],
name: "length", name: "length",
getterGenerator: function(checker){ getterGenerator: function(checker){
const temp = { const temp = {