diff --git a/index.html b/index.html index f129220..98c1e6c 100644 --- a/index.html +++ b/index.html @@ -141,7 +141,7 @@

- Current version: 8.0.5 — released Jul 19, 2024 + Current version: 8.0.6 — released Sep 13, 2024

diff --git a/reference/drive.html b/reference/drive.html index c723ff0..a790896 100644 --- a/reference/drive.html +++ b/reference/drive.html @@ -172,6 +172,190 @@

Turbo.session.drive

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:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
bodyFormData | URLSearchParamsa URLSearchParams instance for "get" requests, FormData otherwise
enctype"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"the HTMLFormElement.enctype value
fetchOptionsRequestInitthe request’s configuration options
headersHeaders | { [string]: [any] }the request’s HTTP headers
method"get" | "post" | "put" | "patch" | "delete"the HTTP verb
paramsURLSearchParamsthe URLSearchParams instance for "get" requests
targetHTMLFormElement | HTMLAnchorElement | FrameElement | nullthe element responsible for initiating the request
urlURLthe request’s URL
+

FetchResponse

+

Turbo dispatches a variety of events while making HTTP requests that reference FetchResponse objects with the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
clientErrorbooleantrue if the status is between 400 and 499, false otherwise
contentTypestringthe value of the Content-Type header
failedbooleantrue if the response did not succeed, false otherwise
isHTMLbooleantrue if the content type is HTML, false otherwise
locationURLthe value of Response.url
redirectedbooleanthe value of Response.redirected
responseHTMLPromise<string>clones the Response if its HTML, then calls [Response.text()][]
responseTextPromise<string>clones the Response, then calls [Response.text()][]
responseResponsethe Response instance
serverErrorbooleantrue if the status is between 500 and 599, false otherwise
statusCodenumberthe value of Response.status
succeededbooleantrue if the Response.ok, false otherwise
+

FormSubmission

+

Turbo dispatches a variety of events while submitting forms that reference FormSubmission objects with the following properties:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
actionstringwhere the <form> element is submitting to
bodyFormData | URLSearchParamsthe underlying [Request][] payload
enctype"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"the HTMLFormElement.enctype
fetchRequestFetchRequestthe underlying FetchRequest instance
formElementHTMLFormElementthe <form> element to that is submitting
isSafebooleantrue if the method is "get", false otherwise
locationURLthe action string transformed into a URL instance
method"get" | "post" | "put" | "patch" | "delete"the HTTP verb
submitter[HTMLButtonElement][] | [HTMLInputElement][] | undefinedthe element responsible for submitting the <form> element

Next: Frames