You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@hylid/call

Package Overview
Dependencies
Maintainers
0
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hylid/call - npm Package Compare versions

Comparing version

to
3.0.0-alpha.12

19

lib/mpWebCall.js

@@ -0,8 +1,20 @@

var __assign = this && this.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var loadAppxBridge = function loadAppxBridge(cb) {
var _a;
try {
// @ts-ignore
if (window.my) {
// umd 包用的 IFF 模式,会立即向 window.my 上注入 jsapi,所以不能试用 window.my 判断是否已经加载了 appx 脚本
if ((_a = window.my) === null || _a === void 0 ? void 0 : _a.__hy_mounted__) {
cb && cb("ready" /* BridgeReady.READY */);
return;
}
var originMy_1 = window.my || {};
var script_1 = document.createElement('script');

@@ -14,2 +26,5 @@ script_1.src = 'https://appx/web-view.min.js';

script_1.onload = null;
window.my = __assign(__assign(__assign({}, window.my), originMy_1), {
__hy_mounted__: true
});
cb && cb("loaded" /* BridgeReady.LOADED */);

@@ -16,0 +31,0 @@ }

6

package.json
{
"name": "@hylid/call",
"version": "3.0.0-alpha.11",
"version": "3.0.0-alpha.12",
"main": "lib/index.js",

@@ -9,4 +9,4 @@ "files": [

"dependencies": {
"@hylid/env": "^3.0.0-alpha.11",
"@hylid/types": "^3.0.0-alpha.11"
"@hylid/env": "^3.0.0-alpha.12",
"@hylid/types": "^3.0.0-alpha.12"
},

@@ -13,0 +13,0 @@ "publishConfig": {