mirror of
https://github.com/pysunday/sdenv.git
synced 2025-04-12 03:37:16 +08:00
26 lines
755 B
JavaScript
26 lines
755 B
JavaScript
const logger = require('@utils/logger');
|
|
module.exports = (sdenv) => {
|
|
const window = sdenv.memory.sdWindow;
|
|
|
|
window.fetch = function fetch() {};
|
|
sdenv.tools.setFuncNative(window.fetch);
|
|
window.Request = function Request() {};
|
|
sdenv.tools.setFuncNative(window.Request);
|
|
window.closed = false;
|
|
window.opener = null;
|
|
window.clientInformation = window.navigator;
|
|
window.isSecureContext = false;
|
|
window.open = function(url) {
|
|
sdenv.tools.exit({ url });
|
|
}
|
|
sdenv.tools.setFuncNative(window.Event, 'Event');
|
|
delete window.XPathException;
|
|
sdenv.tools.setFuncNative(window.prompt, 'prompt');
|
|
// Object.assign(window, {
|
|
// innerWidth: 326,
|
|
// innerHeight: 992,
|
|
// outerWidth: 1728,
|
|
// outerHeight: 1079,
|
|
// });
|
|
}
|