🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

ifapi

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ifapi - npm Package Compare versions

Comparing version
1.1.9
to
1.2.2
+9
-2
main.js

@@ -56,9 +56,15 @@ function response(id, data, error = "") {

export function excute(frameID, actionName, ...params) {
console.log(frameID);
return new Promise((resolve, reject) => {
var _a;
const frame = window.frames[frameID];
if (!frame)
console.log(frame);
if (!frame) {
reject(`iframe not found: ${frameID}`);
return;
}
;
const id = uuid();
function listener(e) {
console.log(e);
window.removeEventListener("message", listener);

@@ -88,4 +94,5 @@ let resp = {};

const requestData = { id, actionName, params };
(_a = frame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify(requestData), frame.src);
console.log(requestData);
(_a = frame.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify(requestData), "*");
});
}
+1
-1

@@ -89,4 +89,4 @@ function response(id: string, data: any, error = "") {

const requestData = { id, actionName, params };
frame.contentWindow?.postMessage(JSON.stringify(requestData), "*");
frame.contentWindow?.postMessage(JSON.stringify(requestData), frame.src);
});
}
{
"name": "ifapi",
"version": "1.1.9",
"version": "1.2.2",
"type": "module",

@@ -5,0 +5,0 @@ "main": "main.js",