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

Method text

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

* Gets the text from the element. * @param options Options that affect what text is included.

(options?: TextOptions)

Source from the content-addressed store, hash-verified

182 * @param options Options that affect what text is included.
183 */
184 async text(options?: TextOptions): Promise<string> {
185 await this._stabilize();
186 if (options?.exclude) {
187 return _getTextWithExcludedElements(this.element, options.exclude);
188 }
189 return (this.element.textContent || '').trim();
190 }
191
192 /**
193 * Sets the value of a `contenteditable` element.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected