1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-05-29 09:28:06 +02: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 = [
{
objectGetters: [
function(window){return window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "x",
getterGenerator: function(checker){
@ -218,8 +218,8 @@
},
{
objectGetters: [
function(window){return window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "y",
getterGenerator: function(checker){
@ -241,8 +241,8 @@
},
{
objectGetters: [
function(window){return window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "width",
getterGenerator: function(checker){
@ -264,8 +264,8 @@
},
{
objectGetters: [
function(window){return window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRect && window.DOMRect.prototype;},
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "height",
getterGenerator: function(checker){
@ -287,7 +287,7 @@
},
{
objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "left",
getterGenerator: function(checker){
@ -302,7 +302,7 @@
},
{
objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "right",
getterGenerator: function(checker){
@ -316,7 +316,7 @@
},
{
objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "top",
getterGenerator: function(checker){
@ -330,7 +330,7 @@
},
{
objectGetters: [
function(window){return window.DOMRectReadOnly.prototype;}
function(window){return window.DOMRectReadOnly && window.DOMRectReadOnly.prototype;}
],
name: "bottom",
getterGenerator: function(checker){
@ -344,7 +344,9 @@
},
{
objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;}
function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
],
name: "intersectionRect",
getterGenerator: function(checker){
@ -363,7 +365,9 @@
},
{
objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;}
function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
],
name: "boundingClientRect",
getterGenerator: function(checker){
@ -382,7 +386,9 @@
},
{
objectGetters: [
function(window){return window.IntersectionObserverEntry.prototype;}
function(window){
return window.IntersectionObserverEntry && window.IntersectionObserverEntry.prototype;
}
],
name: "rootBounds",
getterGenerator: function(checker){

View File

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