Add event emitter subsystem.

This commit is contained in:
SillyLossy
2023-05-16 16:28:38 +03:00
parent 07bc7c434a
commit 5bfd3787fa
5 changed files with 91 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import { callPopup, saveSettings, saveSettingsDebounced } from "../script.js";
import { callPopup, eventSource, event_types, saveSettings, saveSettingsDebounced } from "../script.js";
import { isSubsetOf } from "./utils.js";
export {
getContext,
@ -162,6 +162,7 @@ async function connectToApi(baseUrl) {
const data = await getExtensionsResult.json();
modules = data.modules;
await activateExtensions();
eventSource.emit(event_types.EXTRAS_CONNECTED, modules);
}
updateStatus(getExtensionsResult.ok);