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

Method clear

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

Clear the element's input (for input and textarea elements only).

()

Source from the content-addressed store, hash-verified

79
80 /** Clear the element's input (for input and textarea elements only). */
81 async clear(): Promise<void> {
82 if (!isTextInput(this.element)) {
83 throw Error('Attempting to clear an invalid element');
84 }
85 clearElement(this.element);
86 await this._stabilize();
87 }
88
89 /**
90 * Click the element at the default location for the current environment. If you need to guarantee

Callers

nothing calls this directly

Calls 2

isTextInputFunction · 0.90
clearElementFunction · 0.90

Tested by

no test coverage detected