1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 10:18:15 +09:00
ladybird/Tests/LibWeb/Text/input/HTML/formAction-attribute.html
2024-09-08 09:45:57 +02:00

21 lines
891 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<button formaction="http://www.example.com/"></button>
<input formaction="http://www.example.com/">
<script>
test(() => {
const elementNames = [
"button",
"input",
];
for (const elementName of elementNames) {
const element = document.querySelector(elementName);
println(`${elementName}.formAction initial value: ${element.formAction}`);
element.formAction = "";
println(`Final segment of ${elementName}.formAction after setting to the empty string: ${element.formAction.split('/').pop()}`);
element.formAction = "../test.html";
println(`Final segment of ${elementName}.formAction after setting to "../test.html": ${element.formAction.split('/').pop()}`);
element.remove();
}
});
</script>