Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions extension/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"eslint-plugin-import-x": "^4.17.1",
"eslint-plugin-jest": "^29.16.1",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-unicorn": "72.0.0",
"eslint-plugin-unicorn": "73.0.0",
"fake-indexeddb": "^6.2.5",
"fast-check": "^4.9.0",
"globals": "17.11.0",
Expand Down
20 changes: 15 additions & 5 deletions extension/src/lib/page-world-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@
import { log } from "./log";

export interface PageWorldHookConfig {
/** chrome.scripting content-script id; doubles as the unregister key. */
/**
* chrome.scripting content-script id; doubles as the unregister key.
*/
readonly scriptId: string;
/** Bundled entrypoint filename registered as the MAIN-world script. */
/**
* Bundled entrypoint filename registered as the MAIN-world script.
*/
readonly scriptFile: string;
/** Short label used in this hook's log lines. */
/**
* Short label used in this hook's log lines.
*/
readonly logLabel: string;
/**
* Whether to inject into same-origin subframes (`allFrames`). Each
Expand All @@ -36,7 +42,9 @@ export interface PageWorldHookConfig {
* all-frames when each frame has its own prototype copy to patch.
*/
readonly allFrames: boolean;
/** Is the hook eligible to be registered right now? */
/**
* Is the hook eligible to be registered right now?
*/
readonly shouldRegister: () => Promise<boolean>;
/**
* Storage change-sources that can flip `shouldRegister`'s result. Each is
Expand All @@ -47,7 +55,9 @@ export interface PageWorldHookConfig {
}

export interface PageWorldHook {
/** Reconcile once at startup, then on every subscribed change. */
/**
* Reconcile once at startup, then on every subscribed change.
*/
start: () => void;
}

Expand Down
Loading