Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusso authored Aug 14, 2020
1 parent 72842f2 commit fdb92f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The App has a WebView that shows you the content of a embedded HTML file. Also,
| OS X | OS X 10.12 or later | Yes | Yes
| Android | Android 5.0 or later | Yes | Yes

## JavaScript example - How to download a file to the device
## JavaScript example - How to download a binary file

```javascript
function downloadBinaryFile(myArrayBuffer, filename)
Expand All @@ -23,7 +23,10 @@ function downloadBinaryFile(myArrayBuffer, filename)
}

downloadBinaryFile(myArrayBuffer, "image.jpg");
```
## JavaScript example - How to download a text file

```javascript
function downloadTextFile(textContent, filename)
{
new WebToApp(textContent, filename, "application/octet-stream");
Expand Down

0 comments on commit fdb92f5

Please sign in to comment.