You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a newbie to JS so this is probably a stupid question, but any help would be greatly appreciated
I am using version 1.3.8
I have copied the zip across to my PC and in my html I have a link to the FileSave.js file (from src folder)
When I view this file in Netbeans it gives an error on the export in line 16 and the return line a few statements down.
If I run the code Firefox 60.0.1 gives the error
SyntaxError: export declarations may only appear at top level of a module FileSaver.js:16:1
So I tried deleting the export (as I noticed this is not in the minified file used in the demos)
This removes the error two msgs. But I now have to access FileSaver.saveAs(blob, "hello world.txt");
with saveAs(blob, "hello world.txt");
This now seems to work but some browsers now tell me the download did not complete.
Any help gratefully received.
The text was updated successfully, but these errors were encountered:
FileSaver.js uses exports syntax that not all browsers support. As a workaround, either use an old version of FileSaver.js, or set up your build system to use a tool like Babel to convert FileSaver.js to an older ECMAScript version.
I am a newbie to JS so this is probably a stupid question, but any help would be greatly appreciated
I am using version 1.3.8
I have copied the zip across to my PC and in my html I have a link to the FileSave.js file (from src folder)
When I view this file in Netbeans it gives an error on the export in line 16 and the return line a few statements down.
If I run the code Firefox 60.0.1 gives the error
SyntaxError: export declarations may only appear at top level of a module FileSaver.js:16:1
So I tried deleting the export (as I noticed this is not in the minified file used in the demos)
This removes the error two msgs. But I now have to access FileSaver.saveAs(blob, "hello world.txt");
with saveAs(blob, "hello world.txt");
This now seems to work but some browsers now tell me the download did not complete.
Any help gratefully received.
The text was updated successfully, but these errors were encountered: