MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / assertElements

Function assertElements

front_end/testing/DOMHelpers.ts:94–98  ·  view source on GitHub ↗
(
    nodeList: NodeListOf<Element>,
    elementClass: Platform.Constructor.Constructor<T>)

Source from the content-addressed store, hash-verified

92 * Asserts that all elements of `nodeList` are at least of type `T`.
93 */
94export function assertElements<T extends Element>(
95 nodeList: NodeListOf<Element>,
96 elementClass: Platform.Constructor.Constructor<T>): asserts nodeList is NodeListOf<T> {
97 nodeList.forEach(e => assert.instanceOf(e, elementClass));
98}
99
100export function getElementWithinComponent<T extends HTMLElement, V extends Element>(
101 component: T, selector: string, elementClass: Platform.Constructor.Constructor<V>) {

Callers 10

getHeaderCellsFunction · 0.70
getAllRowsFunction · 0.70
assertNavigationEventsFunction · 0.50
getCellsPerRowFunction · 0.50
extractIconGroupsFunction · 0.50
extractIconGroupsFunction · 0.50

Calls

no outgoing calls

Tested by 4

assertNavigationEventsFunction · 0.40
getCellsPerRowFunction · 0.40
extractIconGroupsFunction · 0.40
extractIconGroupsFunction · 0.40