s/obj/target/
Would a bit of consistency in variable names be too much to ask?
This commit is contained in:
parent
749b29e599
commit
47446baf29
@ -163,16 +163,16 @@
|
|||||||
const unsafeWindow = window;
|
const unsafeWindow = window;
|
||||||
const qute_gm_window_shadow = {}; // stores local changes to window
|
const qute_gm_window_shadow = {}; // stores local changes to window
|
||||||
const qute_gm_windowProxyHandler = {
|
const qute_gm_windowProxyHandler = {
|
||||||
get: function(obj, prop) {
|
get: function(target, prop) {
|
||||||
if (prop in qute_gm_window_shadow)
|
if (prop in qute_gm_window_shadow)
|
||||||
return qute_gm_window_shadow[prop];
|
return qute_gm_window_shadow[prop];
|
||||||
if (prop in obj) {
|
if (prop in target) {
|
||||||
if (typeof obj[prop] === 'function' && typeof obj[prop].prototype == 'undefined')
|
if (typeof target[prop] === 'function' && typeof target[prop].prototype == 'undefined')
|
||||||
// Getting TypeError: Illegal Execution when callers try to execute
|
// Getting TypeError: Illegal Execution when callers try to execute
|
||||||
// eg addEventListener from here because they were returned
|
// eg addEventListener from here because they were returned
|
||||||
// unbound
|
// unbound
|
||||||
return obj[prop].bind(obj);
|
return target[prop].bind(target);
|
||||||
return obj[prop];
|
return target[prop];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
set: function(target, prop, val) {
|
set: function(target, prop, val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user