Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Event Detail types #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seanpdoyle
Copy link
Contributor

The various events dispatched by Turbo can embed references to Turbo specific classes like FetchRequest, FetchResponse, and FormSubmission.

This commit adds dedicated entries to the Drive page, then links to those entries from the Events page.

@seanpdoyle
Copy link
Contributor Author

@afcapel could you review this change as well?

The various events dispatched by Turbo can embed references to Turbo
specific classes like `FetchRequest`, `FetchResponse`, and
`FormSubmission`.

This commit adds dedicated entries to the `Drive` page, then links to
those entries from the `Events` page.
@flavio-b
Copy link
Contributor

@seanpdoyle, in the part about turbo:submit-end, it says that fetchResponse will be null when success: false, but that's not the case:

success can be false and we still get a fetchResponse, which I think is done by requestFailedWithResponse.

It seems like the only time fetchResponse is not present is when fetch itself throws an error, in which case the fetchResponse property is not even set, so we get undefined.

Also, the error property is not present by default, so it's always undefined, except when there's a fetch error, of course. I think this part of the docs could include a note to clarify that the error property is unrelated to the server response and has to do with a failure to submit the request (ex.: no internet connection).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants