Skip to content

Commit 01363df

Browse files
committed
adding timeout option for JSONP loads
1 parent 0cbcb2c commit 01363df

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/SDD.Source.json.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ ME.D = E.extend(true, {}, SDD.Source.D, {
1515
// default object properties
1616
'cfg': {
1717
'cache': true,
18-
'datatype': 'json'
18+
'datatype': 'json',
19+
'timeout': 0
1920
},
2021
'jsonfiles': {}
2122
});
@@ -84,6 +85,7 @@ P.LoadMeta = function(ctx) {
8485
'dataType': this.cfg['datatype'],
8586
'cache': this.cfg['cache'],
8687
'jsonp': false,
88+
'timeout': this.cfg['timeout'],
8789
'jsonpCallback': 'EVEoj_metainf_callback',
8890
'url': this.cfg['path'] + '/metainf.' + this.cfg['datatype']
8991
}).done(function (data, status, jqxhr) {
@@ -125,6 +127,7 @@ P.LoadTag = function(jsf, ctx) {
125127
'dataType': this.cfg['datatype'],
126128
'cache': this.cfg['cache'],
127129
'jsonp': false,
130+
'timeout': this.cfg['timeout'],
128131
'jsonpCallback': 'EVEoj_' + jsf + '_callback',
129132
'url': this.cfg['path'] + '/' + jsf + '.' + this.cfg['datatype']
130133
})

0 commit comments

Comments
 (0)