Reputation: 23233
in my chrome extension I use chrome.downloads.download
to initiate a file download, but in firefox Web Extensions this method is not yet implemented (as seen here).
Is there any other way I can initiate a file download from within my firefox add-on?
Thank you
Upvotes: 2
Views: 1094
Reputation: 23233
Nevermind I used html5's download
attribute.
I create < a>'s using:
var a = document.createElement("a");
and then add the download property like so:
a.download = rowData.url+".mp4";
Clicking the a
link within my web extension firefox add-on now downloads the file instead of opening it within its view.
Upvotes: 3