mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
adding macro to return string or url,
using that macro with the form action, making the form submit process use base url, adding tests.
This commit is contained in:
parent
1ed3521dcf
commit
ce249d9384
6 changed files with 52 additions and 2 deletions
|
@ -98,7 +98,7 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
|||
make_setter!(SetAcceptCharset, "accept-charset");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fs-action
|
||||
make_url_or_base_getter!(Action, "action");
|
||||
make_string_or_document_url_getter!(Action, "action");
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-fs-action
|
||||
make_setter!(SetAction, "action");
|
||||
|
@ -295,7 +295,7 @@ impl HTMLFormElement {
|
|||
pub fn submit(&self, submit_method_flag: SubmittedFrom, submitter: FormSubmitter) {
|
||||
// Step 1
|
||||
let doc = document_from_node(self);
|
||||
let base = doc.url();
|
||||
let base = doc.base_url();
|
||||
// TODO: Handle browsing contexts (Step 2, 3)
|
||||
// Step 4
|
||||
if submit_method_flag == SubmittedFrom::NotFromForm &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue