mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Resolve HTMLFormElement.action relative to document base URL
Rather than returning a relative URL, an absolutized URL is now returned relative to the document base URL
This commit is contained in:
committed by
Andreas Kling
parent
33c62be7f9
commit
48e5d28ec9
Notes:
github-actions[bot]
2024-09-08 07:48:40 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/48e5d28ec98 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1321
14
Tests/LibWeb/Text/input/HTML/HTMLFormElement-action.html
Normal file
14
Tests/LibWeb/Text/input/HTML/HTMLFormElement-action.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<form action="http://www.example.com/"></form>
|
||||
<script>
|
||||
test(() => {
|
||||
const formElement = document.querySelector('form');
|
||||
println(`form.action initial value: ${formElement.action}`);
|
||||
formElement.action = "";
|
||||
println(`Final segment of form.action after setting to the empty string: ${formElement.action.split('/').pop()}`);
|
||||
formElement.action = "../test.html";
|
||||
println(`Final segment of form.action after setting to "../test.html": ${formElement.action.split('/').pop()}`);
|
||||
formElement.remove();
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user