Files
serenity/Tests/LibWeb/Text/input/DOM/getElementById-empty-string.html
Tim Ledbetter ed4f5b88d3 LibWeb: Ensure document.getElementById("") returns null
Previously, if a document had an element whose id was the empty string,
then `document.getElementById("")` and `element.getElementById("")`
would return that element.

(cherry picked from commit f666d967d6bac289346cf19f833f81bdc22adbdb)
2024-07-23 08:44:55 -04:00

9 lines
196 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<div id=""></div>
<script>
test(() => {
println(`document.getElementById(""): ${document.getElementById("")}`);
});
</script>