turbolinks-like feature
Closed this issue · 1 comments
kapouer commented
Not in the scope of this module ! Though really easy to implement it:
HTMLBodyElement.prototype.handleClick = function(e, state) {
console.log("handleClick");
var a = e.target.closest('a');
var href = a && a.getAttribute('href');
if (!href || e.defaultPrevented || a.target) return;
e.preventDefault();
state.push(href);
};
Page.setup(function(state) {
Page.connect(document.body);
});