FileSaver.js icon indicating copy to clipboard operation
FileSaver.js copied to clipboard

Does not seem to work in palemoon

Open rubyFeedback opened this issue 3 years ago • 0 comments

Hey there,

First the .html file I used - it may contain errors, I don't know:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to Create and Save text file in JavaScript</title>
<script src="https://github.com/eligrey/FileSaver.js"></script>

<script>

function foobar() {
  var blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"});
  FileSaver.saveAs(blob, "foobar.md");
}

</script>
</head>
<body>

<button type="button" onclick="foobar();">Click to Save</button>

</body>
 </html>

Anyway. I found FileSaver.js via an online tutorial.

https://www.websparrow.org/web/how-to-create-and-save-text-file-in-javascript

I built some backend via ruby and need a bit of javascript; simplest would be if I could store data into a file anywhere. Right now it does not work.

But my issue request is not so much me wanting you to debug it - you don't need to do that.

My issue request is more:

  • Is there some FAQ that could be mentioned in the main README about common installation and usage errors and problems? Perhaps some example file that is standalone and guaranteed to work? That way I can look at the file that is guaranteed to work (ideally a standalone .html file), and then look what I did wrong, without having to ask anyone else. I am fine tinkering on my own, but right now I simply can not say whether palemoon is at fault or not (I may test with another browser but I think I did something wrong altogether, so my usual procedure is now to google some more, until I understand the situation of javascript saving files better).

rubyFeedback avatar Sep 28 '21 09:09 rubyFeedback