6.3.1 - 新增发布通知权限 / WS 实例创建; 修复 floaty 模块异常 / 安卓 7.x 异常; UI 模式增强; 迁移至 View Binding
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
||||
/* Overwritten protection. */
|
||||
|
||||
let { http } = global;
|
||||
|
||||
/**
|
||||
* @param {org.autojs.autojs.runtime.ScriptRuntime} scriptRuntime
|
||||
* @param {org.mozilla.javascript.Scriptable | global} scope
|
||||
@@ -38,6 +42,9 @@ module.exports = function (scriptRuntime, scope) {
|
||||
newInjectableWebClient() {
|
||||
return new InjectableWebClient(Context.getCurrentContext(), scope);
|
||||
},
|
||||
newWebSocket(url) {
|
||||
return new org.autojs.autojs.core.web.WebSocket(http.__okhttp__, url);
|
||||
},
|
||||
};
|
||||
|
||||
return Web;
|
||||
@@ -46,7 +53,7 @@ module.exports = function (scriptRuntime, scope) {
|
||||
/**
|
||||
* @type {(keyof Internal.Web)[]}
|
||||
*/
|
||||
let methods = [ 'newInjectableWebView', 'newInjectableWebClient' ];
|
||||
let methods = [ 'newInjectableWebView', 'newInjectableWebClient', 'newWebSocket' ];
|
||||
__asGlobal__(web, methods, scope);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user