From 776ab2c71509eb47499d801dd5329505bbd62606 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 7 Feb 2023 09:01:32 -0500 Subject: [PATCH] add getForm() method --- src/internal/form.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/internal/form.ts b/src/internal/form.ts index 527341b96..81123cd8e 100644 --- a/src/internal/form.ts +++ b/src/internal/form.ts @@ -267,6 +267,11 @@ export class FormControlController implements ReactiveController { } } + /** Returns the associated `
` element, if one exists. */ + getForm() { + return this.form ?? null; + } + /** Resets the form, restoring all the control to their default value */ reset(invoker?: HTMLInputElement | SlButton) { this.doAction('reset', invoker);