mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
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:
parent
5bd585d446
commit
514a2a1757
Notes:
github-actions[bot]
2024-08-21 10:22:59 +00:00
Author: https://github.com/khaledev
Commit: 514a2a1757
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1140
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 54 additions and 3 deletions
16
Tests/LibWeb/Text/input/HTML/Location-search-setter.html
Normal file
16
Tests/LibWeb/Text/input/HTML/Location-search-setter.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue