forked from hotwired/turbo
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
turbo:frame-missing
: Dispatch for 4xx and 5xx
Closes hotwired#670 Re-use the existing `2xx` and `3xx` behavior for a response to handle error responses. When the frame is missing from the page (likely for error pages like `404`), dispatch a `turbo:frame-missing` event. Alongside that behavior, yield the [Response][] instance and a `Turbo.visit`-like callback that can transform the `Response` instance into a `Visit`. It also accepts all the arguments that the `Turbo.visit` call normally does. When the event is not canceled, treat the `Response` as a Visit. When the event **is** canceled, let the listener handle it. [Response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
- Loading branch information
1 parent
495de2e
commit f3c4ccd
Showing
4 changed files
with
90 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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