I just noticed that this call is made AFTER the browser is moved to the new route... with no opportunity to cancel... which kinda invalidates its usefulness.
Environment.js:
Environment.prototype.setPath = function(path, navigation, cb) {
// Support (path, cb) arity.
if (typeof navigation === 'function' && cb === undefined) {
cb = navigation;
navigation = {};
}
// Support (path) arity.
if (!navigation) navigation = {};
if (!navigation.isPopState) {
if (navigation.replace) {
this.replaceState(path, navigation);
} else {
this.pushState(path, navigation);
}
}
this.path = path;
this.notify(navigation, cb); // <--- setPath on routers is called (and subsequently on(Before)Navigation calls
};
To allow for aborting in onBeforeNavigation, it would have to be called before replace/pushState calls...
I just noticed that this call is made AFTER the browser is moved to the new route... with no opportunity to cancel... which kinda invalidates its usefulness.
Environment.js
:To allow for aborting in onBeforeNavigation, it would have to be called before replace/pushState calls...