Add an option to set a timeout for XHR requests (#95)

Closes #24.
This commit was merged in pull request #95.
This commit is contained in:
BehindTheMath authored and GitHub committed 2018-01-07 23:56:11 -05:00
1 parent d3d5ef7a11
commit 6491e32437
4 files changed
+12 -1

No files matched your search

+2 -1
View File
@@ -23,6 +23,7 @@ module.exports = function(options){
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.debug = this.options.debug || false
this.options.timeout = this.options.timeout || 0
// we can’t replace body.outerHTML or head.outerHTML
// it create a bug where new body or new head are created in the dom
@@ -37,4 +38,4 @@ module.exports = function(options){
if (typeof options.analytics !== "function") {
options.analytics = function() {}
}
}
}