From d18a10d2c94b9c8d1db1a66e1effc2b3a28db917 Mon Sep 17 00:00:00 2001 From: FallenChromium Date: Wed, 14 Feb 2024 16:55:20 +0300 Subject: [PATCH] add postMessage for command execution --- client/scgJs/core/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/scgJs/core/main.js b/client/scgJs/core/main.js index 9bf59bce..6e42ebf9 100644 --- a/client/scgJs/core/main.js +++ b/client/scgJs/core/main.js @@ -226,6 +226,8 @@ SCWeb.core.Main = { if (result.question !== undefined) { const commandState = new SCWeb.core.CommandState(cmd_addr, cmd_args, fmt_addr); SCWeb.ui.WindowManager.appendHistoryItem(result.question, commandState); + const message = {"type": "commandExecuted", "payload": {"state": commandState, "response": result}}; + window.top.postMessage(message, "*") } else { alert("There are no any answer. Try another request"); }