implement an extension event for IPC messages coming in (#1776)

This commit is contained in:
Nariman Jelveh
2025-10-16 16:52:01 -07:00
committed by GitHub
parent 686c2bc966
commit 8fc533338a
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -141,6 +141,11 @@ const ipc_listener = async (event, handled) => {
return;
}
// --------------------------------------------------------
// Dispatch custom event so that extensions can listen to it
// --------------------------------------------------------
window.dispatchEvent(new CustomEvent('ipc:message', { detail: event.data }));
// todo validate all event.data stuff coming from the client (e.g. event.data.message, .msg, ...)
//-------------------------------------------------
// READY