mixdown-router
Advanced tools
Comparing version 1.0.0 to 1.0.1
12
index.js
@@ -88,2 +88,14 @@ var _ = require('lodash'); | ||
listen: function(callback) { | ||
/* | ||
The popstate event - A popstate event is dispatched to the window every time the active history entry changes. If the history entry being activated was created | ||
by a call to pushState or affected by a call to replaceState, the popstate event's state property contains a copy of the history entry's state object. | ||
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history | ||
https://developer.mozilla.org/en-US/docs/Web/API/window.onpopstate | ||
*/ | ||
window.onpopstate = function(e) { | ||
// you can access state using history.state | ||
self.navigate(url.format(window.location)); | ||
}; | ||
self.navigate(url.format(window.location), callback); | ||
@@ -90,0 +102,0 @@ }, |
{ | ||
"name": "mixdown-router", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Router for mixdown.js", | ||
@@ -22,3 +22,3 @@ "main": "index.js", | ||
"lodash": "~2.2.0", | ||
"pipeline-router": "~1.1.0", | ||
"pipeline-router": "~1.1.1", | ||
"hammock": "~0.1.1" | ||
@@ -25,0 +25,0 @@ }, |
31328
616
Updatedpipeline-router@~1.1.1