aboutsummaryrefslogtreecommitdiff
path: root/src/cdp/session.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdp/session.ts')
-rw-r--r--src/cdp/session.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cdp/session.ts b/src/cdp/session.ts
index 2e0e71f..80fec16 100644
--- a/src/cdp/session.ts
+++ b/src/cdp/session.ts
@@ -43,6 +43,7 @@ export type CdpSession = {
resolveRef(ref: string): number | undefined;
/** The active tab's prior ref signatures — baseline for the post-mutation diff. */
refSignatures(): ReadonlyMap<string, string>;
+ refMappings(): ReadonlyMap<string, number>;
call<M extends CdpMethod>(method: M, params?: ParamsOf<M>, opts?: { timeoutMs?: number }): Promise<Result<ResultOf<M>, CdpError>>;
callOnTarget<M extends CdpMethod>(method: M, params: ParamsOf<M>, sessionId: string, opts?: { timeoutMs?: number }): Promise<Result<ResultOf<M>, CdpError>>;
callBrowser<M extends CdpMethod>(method: M, params?: ParamsOf<M>, opts?: { timeoutMs?: number }): Promise<Result<ResultOf<M>, CdpError>>;
@@ -396,6 +397,10 @@ export const createCdpSession = (
const tab = targetId ? tabs.get(targetId) : undefined;
return tab?.refSig ?? new Map();
},
+ refMappings() {
+ const tab = targetId ? tabs.get(targetId) : undefined;
+ return tab?.refMap ?? new Map();
+ },
call(method, params, opts) {
return req(method, params, sessionId, opts);
},