Browse Source

Add a FormData polyfill for Edge comptaibility

Fixes #1220
JC Brand 6 years ago
parent
commit
31080bf2f9

+ 2 - 1
CHANGES.md

@@ -1,8 +1,9 @@
 # Changelog
 
-## 4.0.2 (2018-??-??)
+## 4.0.2 (Unreleased)
 
 - M4A and WEBM files when sent as XEP-0066 Out of Band Data, are now playable directly in chat
+- #1220 Converse not working in Edge
 
 ## 4.0.1 (2018-09-19)
 

File diff suppressed because it is too large
+ 403 - 2
dist/converse.js


+ 6 - 0
package-lock.json

@@ -4225,6 +4225,12 @@
         "samsam": "1.3.0"
       }
     },
+    "formdata-polyfill": {
+      "version": "3.0.12",
+      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-3.0.12.tgz",
+      "integrity": "sha512-y5V1Y4e2VSJ29+CAHozJwN9BqvsigYicZp/MqeYP00X/UMah3cLb2ix7/58fLcaAjwr8HfztD7Ih/IQCW1BGfw==",
+      "dev": true
+    },
     "fragment-cache": {
       "version": "0.2.1",
       "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",

+ 2 - 1
package.json

@@ -36,6 +36,7 @@
     "@babel/core": "^7.0.0-beta.48",
     "@babel/preset-env": "^7.0.0-beta.48",
     "@babel/preset-es2015": "^7.0.0-beta.49",
+    "@fortawesome/fontawesome-free": "5.3.1",
     "awesomplete-avoid-xss": "^1.1.2",
     "babel-loader": "^8.0.0-beta.3",
     "backbone": "1.3.3",
@@ -53,7 +54,7 @@
     "eslint-plugin-lodash": "^2.3.3",
     "exports-loader": "^0.7.0",
     "filesize": "^3.6.1",
-    "@fortawesome/fontawesome-free": "5.3.1",
+    "formdata-polyfill": "^3.0.12",
     "hellojs": "^1.16.1",
     "http-server": "^0.10.0",
     "imports-loader": "^0.8.0",

+ 2 - 0
src/converse-controlbox.js

@@ -9,6 +9,7 @@
 (function (root, factory) {
     define(["converse-core",
             "bootstrap",
+            "formdata-polyfill",
             "lodash.fp",
             "templates/converse_brand_heading.html",
             "templates/controlbox.html",
@@ -21,6 +22,7 @@
 }(this, function (
             converse,
             bootstrap,
+            _FormData,
             fp,
             tpl_brand_heading,
             tpl_controlbox,

+ 2 - 0
src/converse-muc-views.js

@@ -7,6 +7,7 @@
 (function (root, factory) {
     define([
         "converse-core",
+        "formdata-polyfill",
         "utils/muc",
         "xss",
         "templates/add_chatroom_modal.html",
@@ -34,6 +35,7 @@
     ], factory);
 }(this, function (
     converse,
+    _FormData,
     muc_utils,
     xss,
     tpl_add_chatroom_modal,

+ 2 - 0
src/converse-profile.js

@@ -9,6 +9,7 @@
 (function (root, factory) {
     define(["converse-core",
             "bootstrap",
+            "formdata-polyfill",
             "templates/alert.html",
             "templates/chat_status_modal.html",
             "templates/profile_modal.html",
@@ -20,6 +21,7 @@
 }(this, function (
             converse,
             bootstrap,
+            _FormData,
             tpl_alert,
             tpl_chat_status_modal,
             tpl_profile_modal,

+ 2 - 0
src/converse-rosterview.js

@@ -6,6 +6,7 @@
 
 (function (root, factory) {
     define(["converse-core",
+            "formdata-polyfill",
             "templates/add_contact_modal.html",
             "templates/group_header.html",
             "templates/pending_contact.html",
@@ -20,6 +21,7 @@
     ], factory);
 }(this, function (
             converse, 
+            _FormData,
             tpl_add_contact_modal,
             tpl_group_header,
             tpl_pending_contact,

+ 1 - 0
webpack.config.js

@@ -80,6 +80,7 @@ const config = {
             "IPv6":                     path.resolve(__dirname, "node_modules/urijs/src/IPv6"),
             "SecondLevelDomains":       path.resolve(__dirname, "node_modules/urijs/src/SecondLevelDomains"),
             "awesomplete":              path.resolve(__dirname, "node_modules/awesomplete-avoid-xss/awesomplete"),
+            "formdata-polyfill":        path.resolve(__dirname, "node_modules/formdata-polyfill/FormData"),
             "backbone":                 path.resolve(__dirname, "node_modules/backbone/backbone"),
             "backbone.browserStorage":  path.resolve(__dirname, "node_modules/backbone.browserStorage/backbone.browserStorage"),
             "backbone.nativeview":      path.resolve(__dirname, "node_modules/backbone.nativeview/backbone.nativeview"),

Some files were not shown because too many files changed in this diff