MCPcopy
hub / github.com/angular/components / getLevel

Method getLevel

src/aria/tree/testing/item-harness.ts:64–67  ·  view source on GitHub ↗

Gets the level of the tree item. Note that this gets the aria-level and is 1 indexed.

()

Source from the content-addressed store, hash-verified

62
63 /** Gets the level of the tree item. Note that this gets the aria-level and is 1 indexed. */
64 async getLevel(): Promise<number> {
65 const level = (await this._getHostAttribute('aria-level')) ?? '1';
66 return parseInt(level);
67 }
68
69 /** Gets the tree item's text. */
70 async getText(): Promise<string> {

Callers 6

withMethod · 0.45
getTreeStructureMethod · 0.45
getDescendantsMethod · 0.45

Calls 1

_getHostAttributeMethod · 0.95

Tested by

no test coverage detected