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.
Integrate
[data-turbo-temporary]
with pagehide
event
Closes hotwired#1030 Add a [pagehide][] listener to the `CacheObserver` class to listen for when the page has potential to enter the browser's [Back-Forward Cache][bcfache]. When the event is dispatched with the [persisted][] set to `true`, remove all temporary elements. [pagehide]: https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_event [bfcache]: https://web.dev/articles/bfcache#observe_when_a_page_is_entering_bfcache [persisted]: https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent/persisted
- Loading branch information
1 parent
a247b35
commit 04221a9
Showing
2 changed files
with
24 additions
and
0 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