fix(extension): handle tab return cleanup edge cases

This commit is contained in:
drakezhang
2026-09-07 11:44:11 +08:00
parent f70978bfcf
commit cef59137e4
7 changed files with 244 additions and 15 deletions
+2
View File
@@ -183,6 +183,8 @@ export async function resolveBackendNode(
}
// selector path
try {
// Selector lookup itself attaches CDP, even when no element is found.
cdp.trackSessionTab?.(ctx.sessionId, target.tabId);
const doc = await cdp.send<{ root?: { nodeId?: number } }>(target.tabId, "DOM.getDocument", {
depth: 0,
});