Last active
July 28, 2021 10:45
-
-
Save usutani/51082f8171f2a6c71da3233d01fe8fe7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml submitBubbled | |
hide footbox | |
== == | |
note over Session: new | |
create Navigator | |
Session -> Navigator: new | |
create PageView | |
Session -> PageView: new | |
create BrowserAdapter | |
Session -> BrowserAdapter: new | |
create FormSubmitObserver | |
Session -> FormSubmitObserver: new | |
== == | |
note over FormSubmitObserver: submitBubbled | |
FormSubmitObserver -> Session: willSubmitForm | |
Session -> Session: elementIsNavigable | |
note over FormSubmitObserver #SkyBlue: event.preventDefault() | |
FormSubmitObserver -> Session: formSubmitted | |
Session -> Navigator: submitForm | |
Navigator -> Navigator: stop | |
create FormSubmission | |
Navigator -> FormSubmission: this.formSubmission = new | |
create FetchRequest | |
FormSubmission -> FetchRequest: new | |
Navigator -> FormSubmission: isIdempotent | |
Navigator <-- FormSubmission: false | |
Navigator -> FormSubmission: start | |
FormSubmission -> FetchRequest: perform | |
activate FetchRequest | |
FetchRequest -> FormSubmission: prepareHeadersForRequest | |
FetchRequest -> FetchRequest: allowRequestToBeIntercepted | |
activate FetchRequest | |
note over FetchRequest #SkyBlue: dispatch("turbo:before-fetch-request", { cancelable: true, ... } }) | |
deactivate FetchRequest | |
FetchRequest -> FormSubmission: requestStarted | |
FormSubmission -> Navigator: requestSucceededWithResponse | |
note over FetchRequest #SkyBlue: fetch | |
FetchRequest -> FetchRequest: receive | |
activate FetchRequest | |
create FetchResponse | |
FetchRequest -> FetchResponse: new | |
note over FetchRequest #SkyBlue: dispatch("turbo:before-fetch-response", { cancelable: true, ... }) | |
FetchRequest -> FormSubmission: requestSucceededWithResponse | |
activate FormSubmission | |
FormSubmission -> FetchResponse: clientError | |
FormSubmission <-- FetchResponse: false | |
FormSubmission -> FetchResponse: serverError | |
FormSubmission <-- FetchResponse: false | |
FormSubmission -> FormSubmission: requestMustRedirect | |
activate FormSubmission | |
FormSubmission -> FormSubmission: true | |
deactivate FormSubmission | |
FormSubmission -> FormSubmission: responseSucceededWithoutRedirect | |
activate FormSubmission | |
FormSubmission -> FormSubmission: false | |
deactivate FormSubmission | |
FormSubmission -> Navigator: formSubmissionSucceededWithResponse | |
activate Navigator | |
Navigator -> FetchResponse: responseHTML | |
Navigator -> FormSubmission: method | |
Navigator <-- FormSubmission: FetchMethod.post | |
Navigator -> PageView: clearSnapshotCache | |
Navigator -> Navigator: proposeVisit | |
activate Navigator | |
Navigator -> Session: allowsVisitingLocation | |
Session -> Session: notifyApplicationBeforeVisitingLocation | |
note over Session #SkyBlue: dispatch("turbo:before-visit", ...) | |
Navigator -> Session: visitProposedToLocation | |
Session -> BrowserAdapter: visitProposedToLocation | |
note over BrowserAdapter #Orange: snip | |
deactivate Navigator | |
deactivate Navigator | |
deactivate FormSubmission | |
deactivate FetchRequest | |
FetchRequest -> FormSubmission: requestFinished | |
note over FormSubmission #SkyBlue: dispatch("turbo:submit-end", ...) | |
FormSubmission -> Navigator: formSubmissionFinished | |
deactivate FetchRequest | |
@enduml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment