mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 10:37:17 +02:00
LibWeb: Ensure document.getElementsByName("") returns no elements
Previously, if a document had any element with a name attribute that
was set to the empty string, then `document.getElementsByName("")` and
`element.getElementsByName("")` would return a collection including
those elements.
This commit is contained in:
committed by
Andreas Kling
parent
0fceede029
commit
e40352b6b5
Notes:
github-actions[bot]
2024-07-23 06:59:16 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e40352b6b59 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/773
@@ -0,0 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<div name=""></div>
|
||||
<script>
|
||||
test(() => {
|
||||
println(`document.getElementsByName("").length: ${document.getElementsByName("").length}`);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user