Fixed issue where couldn't set history state to 'false' #76
2
index.js
2
index.js
@@ -81,7 +81,7 @@ Pjax.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
loadContent: function(html, options) {
|
loadContent: function(html, options) {
|
||||||
var tmpEl = document.implementation.createHTMLDocument()
|
var tmpEl = document.implementation.createHTMLDocument("")
|
||||||
|
|
||||||
// parse HTML attributes to copy them
|
// parse HTML attributes to copy them
|
||||||
// since we are forced to use documentElement.innerHTML (outerHTML can't be used for <html>)
|
// since we are forced to use documentElement.innerHTML (outerHTML can't be used for <html>)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ module.exports = function(options){
|
|||||||
this.options.selectors = this.options.selectors || ["title", ".js-Pjax"]
|
this.options.selectors = this.options.selectors || ["title", ".js-Pjax"]
|
||||||
this.options.switches = this.options.switches || {}
|
this.options.switches = this.options.switches || {}
|
||||||
this.options.switchesOptions = this.options.switchesOptions || {}
|
this.options.switchesOptions = this.options.switchesOptions || {}
|
||||||
this.options.history = this.options.history || true
|
this.options.history = (typeof this.options.history === 'undefined') ? true : this.options.history
|
||||||
this.options.analytics = this.options.analytics || function() {
|
this.options.analytics = this.options.analytics || function() {
|
||||||
// options.backward or options.foward can be true or undefined
|
// options.backward or options.foward can be true or undefined
|
||||||
// by default, we do track back/foward hit
|
// by default, we do track back/foward hit
|
||||||
|
|||||||
Reference in New Issue
Block a user