Hi in my web extension I have a button, which I programmatically create a file for download when the user clicks it.
Here is my code:
However, this does nothing when I do it within the popup. It works fine on the main Safari webpage. Am I doing something wrong?
Here is my code:
Code Block const a = document.createElement('a'); const file = new Blob(['test'], { type: 'text' }); a.href = URL.createObjectURL(file); a.download = "test.txt" a.click()
However, this does nothing when I do it within the popup. It works fine on the main Safari webpage. Am I doing something wrong?