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

Method focus

src/aria/private/grid/cell.ts:152–159  ·  view source on GitHub ↗

Focuses the cell or the active widget.

()

Source from the content-addressed store, hash-verified

150
151 /** Focuses the cell or the active widget. */
152 focus(): void {
153 const widget = this.widget();
154 if (widget) {
155 widget.focus();
156 } else {
157 this.element().focus();
158 }
159 }
160
161 /** Gets the tab index for the widget within the cell. */
162 widgetTabIndex(): -1 | 0 {

Callers

nothing calls this directly

Calls 2

focusMethod · 0.65
elementMethod · 0.45

Tested by

no test coverage detected