Commit 52882e94 authored by wang's avatar wang

222

parent 2b166467
This diff is collapsed.
...@@ -269,9 +269,12 @@ function Window(options) { ...@@ -269,9 +269,12 @@ function Window(options) {
console.log('window get', p, typeof res) console.log('window get', p, typeof res)
} }
if (p === 'offsetHeight'){
debugger;
}
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver)) // 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 proxy(res, p)
} }
return res; return res;
......
...@@ -19,6 +19,7 @@ class KeyboardEventImpl extends UIEventImpl { ...@@ -19,6 +19,7 @@ class KeyboardEventImpl extends UIEventImpl {
this.altKey = altKey; this.altKey = altKey;
this.shiftKey = shiftKey; this.shiftKey = shiftKey;
this.metaKey = metaKey; this.metaKey = metaKey;
this.target = view
} }
} }
mixin(KeyboardEventImpl.prototype, EventModifierMixinImpl.prototype); mixin(KeyboardEventImpl.prototype, EventModifierMixinImpl.prototype);
......
...@@ -215,7 +215,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -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."); 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() { get srcElement() {
......
...@@ -406,7 +406,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -406,7 +406,7 @@ exports.install = (globalObject, globalNames) => {
Object.defineProperty(globalObject, interfaceName, { Object.defineProperty(globalObject, interfaceName, {
configurable: true, configurable: true,
writable: true, writable: true,
value: KeyboardEvent value: utils.v_saf(KeyboardEvent)
}); });
}; };
......
...@@ -184,9 +184,10 @@ exports.install = (globalObject, globalNames) => { ...@@ -184,9 +184,10 @@ exports.install = (globalObject, globalNames) => {
}, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS", }, {"brand": "Chromium", "version": "115"}], "mobile": false, "platform": "macOS",
getHighEntropyValues: function (e) { getHighEntropyValues: function (e) {
console.log('getHighEntropyValues', e) console.log('getHighEntropyValues', e)
return { let r;
then: function () { switch (e) {
return { case 'architecture':
r = {
"architecture": "arm", "architecture": "arm",
"brands": [ "brands": [
{ {
...@@ -205,7 +206,72 @@ exports.install = (globalObject, globalNames) => { ...@@ -205,7 +206,72 @@ exports.install = (globalObject, globalNames) => {
"mobile": false, "mobile": false,
"platform": "macOS" "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 { ...@@ -143,11 +143,11 @@ class HTMLElementImpl extends ElementImpl {
} }
get offsetWidth() { get offsetWidth() {
return 0; return 1131;
} }
get offsetHeight() { 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