MCPcopy
hub / github.com/jackwener/OpenCLI / isResolvedFocused

Function isResolvedFocused

src/browser/base-page.ts:476–487  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

474 }
475
476 protected async isResolvedFocused(): Promise<boolean> {
477 try {
478 return await this.evaluate(`
479 (() => {
480 const el = window.__resolved;
481 return !!el && (document.activeElement === el || (typeof el.matches === 'function' && el.matches(':focus')));
482 })()
483 `) as boolean;
484 } catch {
485 return false;
486 }
487 }
488
489 /**
490 * Run a DOM-domain CDP command against `window.__resolved`.

Callers

nothing calls this directly

Calls 1

evaluateMethod · 0.65

Tested by

no test coverage detected