Commit 51ea555e authored by wangmingming's avatar wangmingming

111

parent e8f3818d
This diff is collapsed.
...@@ -269,6 +269,11 @@ exports._internalSetup = (wrapper, globalObject) => { ...@@ -269,6 +269,11 @@ exports._internalSetup = (wrapper, globalObject) => {
esValue[implSymbol]["search"] = V; esValue[implSymbol]["search"] = V;
}, },
get ancestorOrigins() {
return {
length:0
}
},
get hash() { get hash() {
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -307,7 +312,8 @@ exports._internalSetup = (wrapper, globalObject) => { ...@@ -307,7 +312,8 @@ exports._internalSetup = (wrapper, globalObject) => {
port: { configurable: false }, port: { configurable: false },
pathname: { configurable: false }, pathname: { configurable: false },
search: { configurable: false }, search: { configurable: false },
hash: { configurable: false } hash: { configurable: false },
ancestorOrigins: { configurable: false }
}); });
}; };
...@@ -363,7 +369,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -363,7 +369,7 @@ exports.install = (globalObject, globalNames) => {
Object.defineProperty(globalObject, interfaceName, { Object.defineProperty(globalObject, interfaceName, {
configurable: true, configurable: true,
writable: true, writable: true,
value: Location value: utils.proxy(Location, 'Location')
}); });
}; };
......
...@@ -124,8 +124,32 @@ const asyncIteratorNext = Symbol("async iterator get the next iteration result") ...@@ -124,8 +124,32 @@ const asyncIteratorNext = Symbol("async iterator get the next iteration result")
const asyncIteratorReturn = Symbol("async iterator return steps"); const asyncIteratorReturn = Symbol("async iterator return steps");
const asyncIteratorInit = Symbol("async iterator initialization steps"); const asyncIteratorInit = Symbol("async iterator initialization steps");
const asyncIteratorEOI = Symbol("async iterator end of iteration"); 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 = { module.exports = exports = {
proxy,
v_saf, v_saf,
isObject, isObject,
hasOwn, hasOwn,
......
...@@ -51,7 +51,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl { ...@@ -51,7 +51,7 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
} }
getContext(contextId) { getContext(contextId) {
// console.log('contextId', contextId) console.log('contextId', contextId)
const canvas = this._getCanvas(); const canvas = this._getCanvas();
if (canvas) { if (canvas) {
if (!this._context) { if (!this._context) {
......
...@@ -14,7 +14,11 @@ exports.implementation = class LocationImpl { ...@@ -14,7 +14,11 @@ exports.implementation = class LocationImpl {
this._globalObject = globalObject; this._globalObject = globalObject;
} }
get ancestorOrigins() {
return {
length:0
}
}
get _url() { get _url() {
return this._relevantDocument._URL; return this._relevantDocument._URL;
} }
......
This diff is collapsed.
...@@ -1126,6 +1126,7 @@ ...@@ -1126,6 +1126,7 @@
for (var aH in aY.u[aY.u.length - 1]) { for (var aH in aY.u[aY.u.length - 1]) {
l(an, aH) l(an, aH)
} }
console.log(aY.u[aY.u.length - 1], 'inarr', an)
aY.u[aY.u.length - 1] = an aY.u[aY.u.length - 1] = an
}, function (aE) { }, function (aE) {
var aU = tx[aE.c]; 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