Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] History.navigate support for stateObj #1501

Closed
tomkit opened this issue Jul 24, 2012 · 1 comment
Closed

[Enhancement] History.navigate support for stateObj #1501

tomkit opened this issue Jul 24, 2012 · 1 comment

Comments

@tomkit
Copy link

tomkit commented Jul 24, 2012

It would be nice if Backbone supported passing in statObj to window.history.pushstate via Backbone.navigate in its options. Right now if we use Backbone.navigate, the window.onpopstate callback always emits a PopStateEvent.state that is null. There is no way to distinguish between Chrome/Safari firing that event on a page load vs the user actually pressing back/forward.

@braddunbar
Copy link
Collaborator

Hi @tomkit, thanks for opening an issue! This has been discussed before in #764, and tangentially in #1056. Backbone takes the stance that the pushState API is broken, and the only way to use it well is to ignore the first two arguments.

If you disagree with the previous reasons for ignoring those arguments, please respond to them so we can re-evaluate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants