mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
add Form related attribute to HTMLButtonElement
add formAction, formEnctype, formMethod, formTarget
This commit is contained in:
parent
a026ccd4bb
commit
15231db7d3
2 changed files with 21 additions and 4 deletions
|
@ -88,6 +88,23 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#dom-button-type
|
||||
make_setter!(SetType, "type");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#htmlbuttonelement
|
||||
make_url_or_base_getter!(FormAction);
|
||||
|
||||
make_setter!(SetFormAction, "formaction");
|
||||
|
||||
make_enumerated_getter!(FormEnctype, "application/x-www-form-urlencoded", ("text/plain") | ("multipart/form-data"));
|
||||
|
||||
make_setter!(SetFormEnctype, "formenctype");
|
||||
|
||||
make_enumerated_getter!(FormMethod, "get", ("post") | ("dialog"));
|
||||
|
||||
make_setter!(SetFormMethod, "formmethod");
|
||||
|
||||
make_getter!(FormTarget);
|
||||
|
||||
make_setter!(SetFormTarget, "formtarget");
|
||||
}
|
||||
|
||||
impl<'a> VirtualMethods for JSRef<'a, HTMLButtonElement> {
|
||||
|
|
|
@ -8,11 +8,11 @@ interface HTMLButtonElement : HTMLElement {
|
|||
// attribute boolean autofocus;
|
||||
attribute boolean disabled;
|
||||
//readonly attribute HTMLFormElement? form;
|
||||
// attribute DOMString formAction;
|
||||
// attribute DOMString formEnctype;
|
||||
// attribute DOMString formMethod;
|
||||
attribute DOMString formAction;
|
||||
attribute DOMString formEnctype;
|
||||
attribute DOMString formMethod;
|
||||
// attribute boolean formNoValidate;
|
||||
// attribute DOMString formTarget;
|
||||
attribute DOMString formTarget;
|
||||
// attribute DOMString name;
|
||||
attribute DOMString type;
|
||||
// attribute DOMString value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue