mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 09:27:00 +02:00
The `HTMLFormControlsCollection` filter iterates all descendants of the
form's root, which may include non HTMLElement elements such as SVG
elements. The unchecked `as<FormAssociatedElement>` cast would crash on
these elements. Use `as_if` with a null check instead.
This fixes a regression introduced in 9af3e34875.
6 lines
117 B
HTML
6 lines
117 B
HTML
<!DOCTYPE html>
|
|
<form id="f"><svg></svg></form>
|
|
<script>
|
|
document.getElementById("f").elements.length;
|
|
</script>
|