Commit eadb5b6
committed
Use css.querySelectorAll to find form elements
Libdom's formGetCollection doesn't work (like I would expect) for dynamically
added elements.
For example, given:
```
let el = document.createElement('input');
document.getElementsByTagName('form')[0].append(el);
```
(and assume the page has a form), I'd expect `el.form` to be equal to the form
the input was added to. Instead, it's null. This is a problem given that
`dom_html_form_element_get_elements` uses the element's `form` attribute to
"collect" the elements.
This uses our existing querySelector to find the form elements.1 parent faebabe commit eadb5b6
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
181 | 180 | | |
182 | 181 | | |
183 | 182 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 183 | + | |
188 | 184 | | |
189 | 185 | | |
190 | 186 | | |
| |||
297 | 293 | | |
298 | 294 | | |
299 | 295 | | |
| 296 | + | |
300 | 297 | | |
301 | 298 | | |
302 | 299 | | |
| |||
356 | 353 | | |
357 | 354 | | |
358 | 355 | | |
| 356 | + | |
| 357 | + | |
359 | 358 | | |
360 | 359 | | |
361 | 360 | | |
| |||
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
0 commit comments