Selaa lähdekoodia

Merge pull request #4732 from sebavan/master

Fix Tools Download on Edge and IE
David Catuhe 7 vuotta sitten
vanhempi
commit
b9cea7df2e
1 muutettua tiedostoa jossa 5 lisäystä ja 0 poistoa
  1. 5 0
      src/Tools/babylon.tools.ts

+ 5 - 0
src/Tools/babylon.tools.ts

@@ -1121,6 +1121,11 @@
          * @param fileName defines the name of the downloaded file
          */
         public static Download(blob: Blob, fileName: string): void {
+            if (navigator && navigator.msSaveBlob) {
+                navigator.msSaveBlob(blob, fileName);
+                return;
+            }
+
             var url = window.URL.createObjectURL(blob);
             var a = document.createElement("a");
             document.body.appendChild(a);