Last active
September 13, 2023 14:00
-
-
Save jgphilpott/9150baaa95d969d71a7669ebd58f7395 to your computer and use it in GitHub Desktop.
A helpful interface for the window history object.
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
# Credit: https://www.w3schools.com/js/js_window_history.asp | |
class History | |
back: -> | |
return window.history.back() | |
forward: -> | |
return window.history.forward() |
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
// Credit: https://www.w3schools.com/js/js_window_history.asp | |
var History; | |
History = class History { | |
back() { | |
return window.history.back(); | |
} | |
forward() { | |
return window.history.forward(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment