1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

start replacing jquery ajax with fetch

This commit is contained in:
Luke Pulverenti 2015-11-22 13:17:58 -05:00
parent ffb022d13c
commit 62b528a41c
20 changed files with 547 additions and 69 deletions

View file

@ -3113,16 +3113,23 @@
return deferred.promise();
}
// Load the new content.
$.ajax({
url: fileUrl,
type: settings.type,
data: settings.data,
contentType: settings.contentType,
dataType: "html",
success: successFn,
error: this._loadError(absUrl, triggerData, settings, deferred)
});
//// Load the new content.
//$.ajax({
// url: fileUrl,
// type: settings.type,
// data: settings.data,
// contentType: settings.contentType,
// dataType: "html",
// success: successFn,
// error: this._loadError(absUrl, triggerData, settings, deferred)
//});
fetch(fileUrl, {
mode: 'no-cors'
}).then(function (response) {
return response.text();
}).then(successFn);
return deferred.promise();
},