Skip to content

Commit

Permalink
Add headers-received event for extensions (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
uwx authored Jan 29, 2025
1 parent 2884478 commit f503b76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/injector/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class BrowserWindow extends ElectronBrowserWindow {
details.responseHeaders[key] = ["*"];
}

moonlightHost.events.emit("headers-received", details, isMainWindow);

cb({ cancel: false, responseHeaders: details.responseHeaders });
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
NodeEventType,
NodeEventPayloads
} from "./core/event";
import { MoonlightFS } from "./fs";
import type { MoonlightFS } from "./fs";

export type MoonlightHost = {
config: Config;
Expand Down

0 comments on commit f503b76

Please sign in to comment.