diff --git a/source b/source index 76281111e3d..9be56e171e5 100644 --- a/source +++ b/source @@ -2534,6 +2534,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
The following terms are defined in the HTTP specifications: HTTP
Accept
` headerAccept-Language
` headerCache-Control
` headerform
will use the HTTP POST method.
+ put
+ form
will use the HTTP PUT method.
+ patch
+ form
will use the HTTP PATCH method.
+ delete
+ form
will use the HTTP DELETE method.
dialog
@@ -57186,19 +57202,46 @@ form.method === input; // => true
+ The method
attribute can also specify the value
+ "delete
", which has also sends
+ the form's values as query parameters, this time with the HTTP DELETE method:
+
+
<form method="delete" action="/user.cgi">
+ <p><label>User ID: <input type=text name=id></label></p>
+ <p><input type=submit></p>
+ </form>
+
+ On the other hand, here the method
attribute is used to
specify the value "post
", so that the user's
- message is submitted in the HTTP request's body:
<form method="post" action="/post-message.cgi">
+ <form method="post" action="/message.cgi">
<p><label>Message: <input type=text name=m></label></p>
<p><input type=submit value="Submit message"></p>
</form>
The method
attribute also supports the
+ "put
" and
+ "patch
" keywords, which likewise submit the
+ form's data as part of the request body, with the respective HTTP method:
+
+
<form method="put" action="/message/123.cgi">
+ <p><label>Message: <input type=text name=m></label></p>
+ <p><input type=submit value="Save edited message"></p>
+</form>
+
+ In this example, a If scheme is not one of those listed in this table, then the behavior is
@@ -60528,8 +60605,8 @@ fur
task; when the Let referrerPolicy be the empty string. Set the Navigate targetNavigable to url
- using the Assert: method is POST. Assert: method is POST,
+ PUT, or
+ PATCH. Switch on enctype:
@@ -60636,9 +60715,9 @@ fur
Plan to navigate to parsed action given a POST
- resource whose request body is
- body and request
+ Plan to navigate to parsed action given a request
+ resource whose request body is
+ body and request
content-type is mimeType. (Notably, this will be null even for " To create a fresh top-level traversable given a URL
- initialNavigationURL and an optional POST resource-or-null
- initialNavigationPostResource (default null): Let traversable be the result of creating a new top-level
@@ -98530,7 +98607,7 @@ interface NotRestoredReasons {
Navigate traversable to initialNavigationURL using
traversable's active document, with documentResource set to
- initialNavigationPostResource. We treat these initial navigations as traversable navigating itself,
which will ensure all relevant security checks pass. URL, a URL method, an HTTP request
+ method, initially set to GET document state, a document
state. A resource, a string, POST resource
- or null, initially null. A resource, a string,
+ request resource or null, initially null. A string is treated as HTML. It's used to store the source of an A POST resource has: A request resource has: A request body, a
- byte sequence or failure. A request
+ body, a byte sequence or failure. This is only ever accessed in parallel, so it doesn't need to be stored in
memory. However, it must return the same byte sequence each time. If this isn't
@@ -100368,7 +100448,7 @@ interface NotRestoredReasons {
this must be set to failure. A request
+ A request
content-type, which is ` To navigate a navigable navigable to a
URL url using an optional Let entryListForFiring be formDataEntryList if
- documentResource is a POST resource; otherwise, null. Let navigationAPIStateForFiring be navigationAPIState if
navigationAPIState is not null; otherwise,
@@ -101541,8 +101623,8 @@ location.href = '#foo';
Let historyEntry be a new session history entry, with its URL set to url and its document state set to
+ data-x="she-url">URL set to url, its method
+ set to method and its document state set to
documentState. Let navigationParams be null. entry's URL's scheme is a fetch scheme; and documentResource is null, or allowPOST is true and
- documentResource's request body
- is not failure, documentResource is null, or allowUnsafe is true and
+ documentResource's request
+ body is not failure, then set navigationParams to the result of method to ` Set request's method to
+ entry's method. Set request's body to
- documentResource's request
+ documentResource's request
body. Set ` Let allowPOST be targetEntry's Let allowUnsafe be targetEntry's document state's reload pending. In parallel, attempt to populate the history entry's
document for targetEntry, given navigable,
potentiallyTargetSpecificSourceSnapshotParams, targetSnapshotParams,
- userInvolvement, with allowPOST set
- to allowPOST and completionSteps set to
- queue a global task on the navigation and traversal task source
- given navigable's active window to run
- afterDocumentPopulated. Otherwise, run afterDocumentPopulated immediately. When a user requests a reload of a navigable whose active session history entry's document state's resource is a POST resource, the user agent
- should prompt the user to confirm the operation first, since otherwise transactions (e.g.,
- purchases or database modifications) could be repeated. When a user requests a reload of a navigable, user agents may provide
a mechanism for ignoring any caches when reloading.form
is used with a dialog
. The
GET
+ DELETE
POST
+ PUT
+ PATCH
+ DELETE
http
Mutate action URL
+ Mutate action URL
Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Mutate action URL
https
Mutate action URL
+ Mutate action URL
Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Submit as entity body
+ Mutate action URL
ftp
Get action URL
Get action URL
+ Get action URL
+ Get action URL
+ Get action URL
javascript
Get action URL
Get action URL
+ Get action URL
+ Get action URL
+ Get action URL
data
Mutate action URL
+ Mutate action URL
+ Get action URL
Get action URL
+ Get action URL
+ Get action URL
+ Get action URL
+ Mutate action URL
mailto
Mail with headers
+ Mail with headers
+ Mail as body
+ Mail as body
+ Mail as body
Mail as body
+ Mail as body
+ Mail with headers
form
is first created, its
planned navigation must be set to null. In the behaviors described below, when the
user agent is required to plan to navigate to a URL url given
- an optional POST resource-or-null postResource (default null), it must
- run the following steps:
@@ -60584,8 +60662,9 @@ fur
form
's planned navigation to null.form
element's node document, with form element's node document,
+ with method set to method, with historyHandling set to historyHandling, userInvolvement set to userInvolvement,
sourceElement set to submitter,
referrerPolicy set to referrerPolicy,
- documentResource set to postResource, and formDataEntryList set to entry
+ documentResource set to requestResource, and
+ formDataEntryList set to entry
list.replace
" navigation representing a POST form submission; null otherwise.reload
"
or "traverse
" navigations that are revisiting
@@ -98519,8 +98596,8 @@ interface NotRestoredReasons {
@@ -104562,19 +104644,19 @@ location.href = '#foo';
state's reload pending to
false.
- iframe
NotRestoredReasons {
-
@@ -101191,9 +101271,11 @@ location.href = '#foo';application/x-www-form-urlencoded
`,
`multipart/form-data
`, or `text/plain
`.Document
-or-null sourceDocument (default null), with an optional POST
+ id="source-browsing-context">sourceDocument (default null), with an optional request
resource, string, or null documentResource (default null), an optional documentResource (default null), an optional request
+ method method, an optional response-or-null response (default null), an optional boolean exceptionsEnabled (default false), an optional
@@ -101446,7 +101528,7 @@ location.href = '#foo';
window's navigation API.other
"), an optional boolean allowPOST (default false), and optional
+ data-x="attempt-to-populate-allow-unsafe">allowUnsafe (default false), and optional
algorithm steps completionSteps (default an empty
algorithm):
@@ -103036,9 +103118,9 @@ location.href = '#foo';
POST
`.Content-Type
`
- to documentResource's request
+ to documentResource's request
content-type in request's header
list.