about summary refs log tree commit diff stats
path: root/src/html/chadombuilder.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/chadombuilder.nim')
-rw-r--r--src/html/chadombuilder.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/html/chadombuilder.nim b/src/html/chadombuilder.nim
index acddb287..2ddd067b 100644
--- a/src/html/chadombuilder.nim
+++ b/src/html/chadombuilder.nim
@@ -116,8 +116,9 @@ proc addAttrsIfMissing(builder: DOMBuilder[Node], element: Node,
 proc setScriptAlreadyStarted(builder: DOMBuilder[Node], script: Node) =
   HTMLScriptElement(script).alreadyStarted = true
 
-proc associateWithForm(builder: DOMBuilder[Node], element, form: Node) =
-  if form.inSameTree(element):
+proc associateWithForm(builder: DOMBuilder[Node], element, form,
+    intendedParent: Node) =
+  if form.inSameTree(intendedParent):
     #TODO remove following test eventually
     if Element(element).tagType in SupportedFormAssociatedElements:
       let element = FormAssociatedElement(element)