Created
July 19, 2021 01:04
-
-
Save liuxd/34bb5ce2128eeb352b9da35f5a9c5a9e to your computer and use it in GitHub Desktop.
[Detect Back Button Event]
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
if (performance.getEntriesByType("navigation")[0].type === 'back_forward') { | |
// do something. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment