LibWeb: Implement HTMLInputElement.formAction

This commit is contained in:
Tim Ledbetter 2024-09-07 23:27:33 +01:00 committed by Andreas Kling
parent c25dda767e
commit 33c62be7f9
Notes: github-actions[bot] 2024-09-08 07:48:46 +00:00
3 changed files with 7 additions and 2 deletions
Tests/LibWeb/Text
Userland/Libraries/LibWeb/HTML

View file

@ -1,3 +1,6 @@
button.formAction initial value: http://www.example.com/
button.formAction initial value: http://www.example.com/
Final segment of button.formAction after setting to the empty string: formAction-attribute.html
Final segment of button.formAction after setting to "../test.html": test.html
input.formAction initial value: http://www.example.com/
Final segment of input.formAction after setting to the empty string: formAction-attribute.html
Final segment of input.formAction after setting to "../test.html": test.html

View file

@ -1,10 +1,12 @@
<!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);

View file

@ -17,7 +17,7 @@ interface HTMLInputElement : HTMLElement {
[CEReactions, Reflect] attribute boolean disabled;
readonly attribute HTMLFormElement? form;
attribute FileList? files;
[FIXME, CEReactions] attribute USVString formAction;
[CEReactions] attribute USVString formAction;
[FIXME, CEReactions] attribute DOMString formEnctype;
[FIXME, CEReactions] attribute DOMString formMethod;
[CEReactions, Reflect=formnovalidate] attribute boolean formNoValidate;