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

Method isDisabled

src/material/input/testing/input-harness.ts:41–50  ·  view source on GitHub ↗

Whether the input is disabled.

()

Source from the content-addressed store, hash-verified

39
40 /** Whether the input is disabled. */
41 async isDisabled(): Promise<boolean> {
42 const host = await this.host();
43 const disabled = await host.getAttribute('disabled');
44
45 if (disabled !== null) {
46 return coerceBooleanProperty(disabled);
47 }
48
49 return (await host.getAttribute('aria-disabled')) === 'true';
50 }
51
52 /** Whether the input is required. */
53 async isRequired(): Promise<boolean> {

Calls 2

coerceBooleanPropertyFunction · 0.90
getAttributeMethod · 0.65

Tested by

no test coverage detected