feat: add ponyfills to support multipart requests on android webview versions < 50 and iOS versions < 13.2

This commit is contained in:
Sefa Ilkimen
2019-11-18 02:01:02 +01:00
parent 3e5c941fdd
commit 7a09fa9460
12 changed files with 184 additions and 36 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ module.exports = function init(global, console, messages) {
var interface = {
checkBlobApi: checkBlobApi,
checkFileReaderApi: checkFileReaderApi,
checkFormDataApi: checkFormDataApi,
checkFormDataInstance: checkFormDataInstance,
checkTextEncoderApi: checkTextEncoderApi,
logWarnings: logWarnings,
};
@@ -29,8 +29,8 @@ module.exports = function init(global, console, messages) {
}
}
function checkFormDataApi() {
if (!global.FormData || !global.FormData.prototype || !global.FormData.prototype.entries) {
function checkFormDataInstance(instance) {
if (!instance || !instance.entries) {
throw new Error(messages.MISSING_FORMDATA_ENTRIES_API);
}
}