Add timeout for XHR requests #95
@@ -392,7 +392,7 @@ Useful to debug page layout differences.
|
|||||||
|
|
||||||
When set to true, clicking on a link that point the current url trigger a full page reload.
|
When set to true, clicking on a link that point the current url trigger a full page reload.
|
||||||
|
|
||||||
##### `timeout` (Integer, default to 10000)
|
##### `timeout` (Integer, default to 0)
|
||||||
|
|
||||||
The timeout in milliseconds for the XHR requests. Set to 0 to disable the timeout.
|
The timeout in milliseconds for the XHR requests. Set to 0 to disable the timeout.
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ module.exports = function(options){
|
|||||||
this.options.scrollTo = (typeof this.options.scrollTo === 'undefined') ? 0 : this.options.scrollTo;
|
this.options.scrollTo = (typeof this.options.scrollTo === 'undefined') ? 0 : this.options.scrollTo;
|
||||||
this.options.cacheBust = (typeof this.options.cacheBust === 'undefined') ? true : this.options.cacheBust
|
this.options.cacheBust = (typeof this.options.cacheBust === 'undefined') ? true : this.options.cacheBust
|
||||||
this.options.debug = this.options.debug || false
|
this.options.debug = this.options.debug || false
|
||||||
this.options.timeout = this.options.timeout || 10000
|
this.options.timeout = this.options.timeout || 0
|
||||||
|
|
||||||
// we can’t replace body.outerHTML or head.outerHTML
|
// we can’t replace body.outerHTML or head.outerHTML
|
||||||
// it create a bug where new body or new head are created in the dom
|
// it create a bug where new body or new head are created in the dom
|
||||||
@@ -38,4 +38,4 @@ module.exports = function(options){
|
|||||||
if (typeof options.analytics !== "function") {
|
if (typeof options.analytics !== "function") {
|
||||||
options.analytics = function() {}
|
options.analytics = function() {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user