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

Method hasClass

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

Checks whether the element has the given class.

(name: string)

Source from the content-addressed store, hash-verified

216
217 /** Checks whether the element has the given class. */
218 async hasClass(name: string): Promise<boolean> {
219 await this._stabilize();
220 return this.element.classList.contains(name);
221 }
222
223 /** Gets the dimensions of the element. */
224 async getDimensions(): Promise<ElementDimensions> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected