MCPcopy Create free account
hub / github.com/angular/components / isFocused

Method isFocused

src/cdk/testing/testbed/unit-test-element.ts:280–283  ·  view source on GitHub ↗

Checks whether the element is focused.

()

Source from the content-addressed store, hash-verified

278
279 /** Checks whether the element is focused. */
280 async isFocused(): Promise<boolean> {
281 await this._stabilize();
282 return document.activeElement === this.element;
283 }
284
285 /**
286 * Dispatches an event with a particular name.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected