LibWeb: Throw a SyntaxError on invalid URL for Location href setter

Aligning with a spec update, fixing 195 tests for:

https://wpt.live/url/failure.html
This commit is contained in:
Shannon Booth 2024-10-06 09:29:49 +13:00 committed by Tim Flynn
parent 59ed823724
commit ea971792b5
Notes: github-actions[bot] 2024-10-06 14:07:18 +00:00
3 changed files with 18 additions and 5 deletions

View file

@ -0,0 +1,10 @@
<script src="../include.js"></script>
<script>
test(() => {
try {
location.href = 'http://@:www.invalid-url.com';
} catch (e) {
println(`Error setting href: ${e}`);
}
});
</script>