diff --git a/index.html b/index.html index f129220..98c1e6c 100644 --- a/index.html +++ b/index.html @@ -141,7 +141,7 @@
Turbo.session.drive = false
Turns Turbo Drive off by default. You must now opt-in to Turbo Drive on a per-link and per-form basis using data-turbo="true"
.
FetchRequest
Turbo dispatches a variety of events while making HTTP requests that reference FetchRequest
objects with the following properties:
Property | +Type | +Description | +
---|---|---|
body |
+FormData | URLSearchParams | +a URLSearchParams instance for "get" requests, FormData otherwise |
+
enctype |
+"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain" |
+the HTMLFormElement.enctype value | +
fetchOptions |
+RequestInit | +the request’s configuration options | +
headers |
+Headers | { [string]: [any] } |
+the request’s HTTP headers | +
method |
+"get" | "post" | "put" | "patch" | "delete" |
+the HTTP verb | +
params |
+URLSearchParams | +the URLSearchParams instance for "get" requests |
+
target |
+HTMLFormElement | HTMLAnchorElement | FrameElement | null |
+the element responsible for initiating the request | +
url |
+URL | +the request’s URL | +
FetchResponse
Turbo dispatches a variety of events while making HTTP requests that reference FetchResponse
objects with the following properties:
Property | +Type | +Description | +
---|---|---|
clientError |
+boolean |
+true if the status is between 400 and 499, false otherwise |
+
contentType |
+string |
+the value of the Content-Type header | +
failed |
+boolean |
+true if the response did not succeed, false otherwise |
+
isHTML |
+boolean |
+true if the content type is HTML, false otherwise |
+
location |
+URL | +the value of Response.url | +
redirected |
+boolean |
+the value of Response.redirected | +
responseHTML |
+Promise<string> |
+clones the Response if its HTML, then calls [Response.text()][] |
+
responseText |
+Promise<string> |
+clones the Response , then calls [Response.text()][] |
+
response |
+Response | +the Response instance |
+
serverError |
+boolean |
+true if the status is between 500 and 599, false otherwise |
+
statusCode |
+number |
+the value of Response.status | +
succeeded |
+boolean |
+true if the Response.ok, false otherwise |
+
FormSubmission
Turbo dispatches a variety of events while submitting forms that reference FormSubmission
objects with the following properties:
Property | +Type | +Description | +
---|---|---|
action |
+string |
+where the <form> element is submitting to |
+
body |
+FormData | URLSearchParams | +the underlying [Request][] payload | +
enctype |
+"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain" |
+the HTMLFormElement.enctype | +
fetchRequest |
+FetchRequest | +the underlying FetchRequest instance | +
formElement |
+HTMLFormElement | +the <form> element to that is submitting |
+
isSafe |
+boolean |
+true if the method is "get" , false otherwise |
+
location |
+URL | +the action string transformed into a URL instance |
+
method |
+"get" | "post" | "put" | "patch" | "delete" |
+the HTTP verb | +
submitter |
+[HTMLButtonElement][] | [HTMLInputElement][] | undefined |
+the element responsible for submitting the <form> element |
+