Commit 52882e94 authored by wang's avatar wang

222

parent 2b166467
This diff is collapsed.
......@@ -269,9 +269,12 @@ function Window(options) {
console.log('window get', p, typeof res)
}
if (p === 'offsetHeight'){
debugger;
}
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent', 'performance','debug','_eventListenerss'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
if (!['_registeredHandlers', 'window', '_currentEvent', 'performance','debug','_eventListenerss','top'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, p)
}
return res;
......
......@@ -19,6 +19,7 @@ class KeyboardEventImpl extends UIEventImpl {
this.altKey = altKey;
this.shiftKey = shiftKey;
this.metaKey = metaKey;
this.target = view
}
}
mixin(KeyboardEventImpl.prototype, EventModifierMixinImpl.prototype);
......
......@@ -215,7 +215,7 @@ exports.install = (globalObject, globalNames) => {
throw new TypeError("'get target' called on an object that is not a valid instance of Event.");
}
return utils.tryWrapperForImpl(esValue[implSymbol]["target"]);
return utils.tryWrapperForImpl(esValue[implSymbol]["view"]);
}
get srcElement() {
......
......@@ -406,7 +406,7 @@ exports.install = (globalObject, globalNames) => {
Object.defineProperty(globalObject, interfaceName, {
configurable: true,
writable: true,
value: KeyboardEvent
value: utils.v_saf(KeyboardEvent)
});
};
......
......@@ -184,9 +184,10 @@ exports.install = (globalObject, globalNames) => {
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS",
getHighEntropyValues: function (e) {
console.log('getHighEntropyValues', e)
return {
then: function () {
return {
let r;
switch (e) {
case 'architecture':
r = {
"architecture": "arm",
"brands": [
{
......@@ -205,7 +206,72 @@ exports.install = (globalObject, globalNames) => {
"mobile": false,
"platform": "macOS"
}
}
break;
case 'bitness':
r = {
"bitness": "64",
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}],
"mobile": false,
"platform": "macOS"
}
break;
case 'brands':
r = {
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS"
}
break;
case 'mobile':
r = {
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS"
}
break;
case 'model':
r = {
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS"
}
break;
case 'platform':
r = {
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS"
}
break;
case 'platformVersion':
r = {
"brands": [{"brand": "Not/A)Brand", "version": "99"}, {
"brand": "Google Chrome",
"version": "115"
}, {"brand": "Chromium", "version": "115"}],
"mobile": false,
"platform": "macOS",
"platformVersion": "13.5.0"
}
break;
case 'uaFullVersion':
r = {"brands":[{"brand":"Not/A)Brand","version":"99"},{"brand":"Google Chrome","version":"115"},{"brand":"Chromium","version":"115"}],"mobile":false,"platform":"macOS","uaFullVersion":"115.0.5790.114"}
break;
case 'wow64':
r = {"brands":[{"brand":"Not/A)Brand","version":"99"},{"brand":"Google Chrome","version":"115"},{"brand":"Chromium","version":"115"}],"mobile":false,"platform":"macOS","wow64":false}
break;
case 'fullVersionList':
r = {"brands":[{"brand":"Not/A)Brand","version":"99"},{"brand":"Google Chrome","version":"115"},{"brand":"Chromium","version":"115"}],"fullVersionList":[{"brand":"Not/A)Brand","version":"99.0.0.0"},{"brand":"Google Chrome","version":"115.0.5790.114"},{"brand":"Chromium","version":"115.0.5790.114"}],"mobile":false,"platform":"macOS"}
break;
}
}
}
......
......@@ -143,11 +143,11 @@ class HTMLElementImpl extends ElementImpl {
}
get offsetWidth() {
return 0;
return 1131;
}
get offsetHeight() {
return 0;
return 25;
}
}
......
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