run choo event handlers first (#479)
This commit is contained in:
@@ -62,14 +62,14 @@ function Choo (opts) {
|
||||
}
|
||||
})
|
||||
|
||||
bus.on('render', rerender)
|
||||
bus.prependListener('render', rerender)
|
||||
|
||||
if (opts.history !== false) {
|
||||
nanohistory(function (href) {
|
||||
bus.emit('pushState')
|
||||
})
|
||||
|
||||
bus.on('pushState', function (href) {
|
||||
bus.prependListener('pushState', function (href) {
|
||||
if (href) window.history.pushState({}, null, href)
|
||||
bus.emit('render')
|
||||
setTimeout(function () {
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
"dependencies": {
|
||||
"bel": "^4.5.1",
|
||||
"document-ready": "^2.0.1",
|
||||
"nanobus": "^3.0.0",
|
||||
"nanobus": "^3.1.0",
|
||||
"nanohistory": "^1.0.0",
|
||||
"nanohref": "^1.0.0",
|
||||
"nanomorph": "^4.0.0",
|
||||
|
||||
Reference in New Issue
Block a user