Add timeout for XHR requests

Closes #24.
This commit is contained in:
Behind The Math
2017-12-21 23:01:29 -05:00
parent d3d5ef7a11
commit 66ec50fec5
4 changed files with 11 additions and 0 deletions

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 || 10000
// we cant replace body.outerHTML or head.outerHTML
// it create a bug where new body or new head are created in the dom