Commit 51ea555e authored by wangmingming's avatar wangmingming

111

parent e8f3818d
This diff is collapsed.
......@@ -268,6 +268,11 @@ exports._internalSetup = (wrapper, globalObject) => {
});
esValue[implSymbol]["search"] = V;
},
get ancestorOrigins() {
return {
length:0
}
},
get hash() {
const esValue = this !== null && this !== undefined ? this : globalObject;
......@@ -307,7 +312,8 @@ exports._internalSetup = (wrapper, globalObject) => {
port: { configurable: false },
pathname: { configurable: false },
search: { configurable: false },
hash: { configurable: false }
hash: { configurable: false },
ancestorOrigins: { configurable: false }
});
};
......@@ -363,7 +369,7 @@ exports.install = (globalObject, globalNames) => {
Object.defineProperty(globalObject, interfaceName, {
configurable: true,
writable: true,
value: Location
value: utils.proxy(Location, 'Location')
});
};
......
......@@ -124,8 +124,32 @@ const asyncIteratorNext = Symbol("async iterator get the next iteration result")
const asyncIteratorReturn = Symbol("async iterator return steps");
const asyncIteratorInit = Symbol("async iterator initialization steps");
const asyncIteratorEOI = Symbol("async iterator end of iteration");
const proxy = function (tt, name) {
return new Proxy(tt, {
get(target, p, receiver) {
let res = Reflect.get(target, p, receiver);
if (p !== 'debug' && p !== 'Object') {
console.log(`${name} get`, p, typeof res)
}
// if (p === 'offsetHeight'){
// debugger;
// }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent', 'performance', 'debug', '_eventListenerss', 'top', 'prototype'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, p)
}
return res;
},
// getPrototypeOf(target) {
//
// }
})
}
module.exports = exports = {
proxy,
v_saf,
isObject,
hasOwn,
......
......@@ -51,7 +51,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
}
getContext(contextId) {
// console.log('contextId', contextId)
console.log('contextId', contextId)
const canvas = this._getCanvas();
if (canvas) {
if (!this._context) {
......
......@@ -14,7 +14,11 @@ exports.implementation = class LocationImpl {
this._globalObject = globalObject;
}
get ancestorOrigins() {
return {
length:0
}
}
get _url() {
return this._relevantDocument._URL;
}
......
This diff is collapsed.
......@@ -1126,6 +1126,7 @@
for (var aH in aY.u[aY.u.length - 1]) {
l(an, aH)
}
console.log(aY.u[aY.u.length - 1], 'inarr', an)
aY.u[aY.u.length - 1] = an
}, function (aE) {
var aU = tx[aE.c];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment