LibWeb: Add setter implementation for location.search

This commit implements the setter for `location.search`, allowing
updates to the query string of the URL.
This commit is contained in:
Khaled Lakehal 2024-08-20 15:22:14 +02:00 committed by Tim Ledbetter
commit 514a2a1757
Notes: github-actions[bot] 2024-08-21 10:22:59 +00:00
3 changed files with 54 additions and 3 deletions

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
asyncTest(done => {
try {
if (window.location.search === "") {
window.location.search = "?foo=bar";
} else {
println(`location.search set to ${window.location.search}`);
done();
}
} catch (e) {
println(`Setting location.search throws ${e.name}`);
}
});
</script>