This commit is contained in:
konnorrogers
2025-11-21 18:14:03 -05:00
parent 3a7abec75c
commit 47580c5516
2 changed files with 6 additions and 7 deletions

View File

@@ -136,7 +136,7 @@ export default class WaButton extends WebAwesomeFormAssociatedElement {
const button = document.createElement('button');
for (const attribute of this.attributes) {
button.setAttribute(attribute.name, attribute.value)
button.setAttribute(attribute.name, attribute.value);
}
button.type = this.type;

View File

@@ -209,19 +209,18 @@ export class WebAwesomeFormAssociatedElement
* to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
* the same document or shadow root for this to work.
*/
set form (val: string) {
set form(val: string) {
if (val) {
this.setAttribute("form", val)
this.setAttribute('form', val);
} else {
this.removeAttribute("form")
this.removeAttribute('form');
}
}
get form (): HTMLFormElement | null {
return this.internals.form
get form(): HTMLFormElement | null {
return this.internals.form;
}
@property({ attribute: false, state: true, type: Object })
get validity() {
return this.internals.validity;