You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
771 B
32 lines
771 B
//https://sennajs.com/docs
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
var app = senna.dataAttributeHandler.getApp();
|
|
|
|
app.on('beforeNavigate', function (event) {
|
|
console.log('start');
|
|
if (unload) {
|
|
unload();
|
|
}
|
|
});
|
|
|
|
app.on('endNavigate', function (event) {
|
|
console.log('end');
|
|
if (event.error) {
|
|
console.log('error');
|
|
if (event.error.invalidStatus) {
|
|
console.log(event.error.invalidStatus);
|
|
}
|
|
|
|
if (event.error.requestError) {
|
|
console.log(event.error.requestError);
|
|
}
|
|
|
|
if (event.error.timeout) {
|
|
console.log(event.error.timeout);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|