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

Method getType

src/material/button/testing/button-harness.ts:177–184  ·  view source on GitHub ↗

* Gets the type of the button. Supported values are 'button', 'submit', and 'reset'.

()

Source from the content-addressed store, hash-verified

175 * Gets the type of the button. Supported values are 'button', 'submit', and 'reset'.
176 */
177 async getType(): Promise<ButtonType | null> {
178 const host = await this.host();
179 const buttonType = await host.getAttribute('type');
180 if (buttonType === 'button' || buttonType === 'submit' || buttonType === 'reset') {
181 return buttonType;
182 }
183 return null;
184 }
185}

Callers 2

withMethod · 0.45

Calls 1

getAttributeMethod · 0.65

Tested by

no test coverage detected