Skip to content

Instantly share code, notes, and snippets.

@jgphilpott
Last active September 13, 2023 14:00
Show Gist options
  • Save jgphilpott/9150baaa95d969d71a7669ebd58f7395 to your computer and use it in GitHub Desktop.
Save jgphilpott/9150baaa95d969d71a7669ebd58f7395 to your computer and use it in GitHub Desktop.
A helpful interface for the window history object.
# Credit: https://www.w3schools.com/js/js_window_history.asp
class History
back: ->
return window.history.back()
forward: ->
return window.history.forward()
// 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