diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-06 09:13:54 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-06-06 09:13:54 +0200 |
| commit | ab0db69a7b11ba1a9dc52d50c94e9e321b70ebf0 (patch) | |
| tree | 76be6a8b1596ea1e74dbf7085b85214c2c83e69a /README.md | |
| parent | 961c3470d7e9bdf5efbe0509f586be75d7052d8b (diff) | |
| download | emscripten-tutorial-ab0db69a7b11ba1a9dc52d50c94e9e321b70ebf0.tar.gz emscripten-tutorial-ab0db69a7b11ba1a9dc52d50c94e9e321b70ebf0.zip | |
Added example 6
Diffstat (limited to '')
| -rw-r--r-- | README.md | 13 |
1 files changed, 13 insertions, 0 deletions
| @@ -75,3 +75,16 @@ thread by using a web worker. | |||
| 75 | ## 5. Callback functions | 75 | ## 5. Callback functions |
| 76 | 76 | ||
| 77 | In `05_callback` the example is extended to include a callback function. | 77 | In `05_callback` the example is extended to include a callback function. |
| 78 | |||
| 79 | ## 6. Storage | ||
| 80 | |||
| 81 | In `06_storage` we show how to use Emscripten's | ||
| 82 | [file system API](https://emscripten.org/docs/api_reference/Filesystem-API.html) | ||
| 83 | using as backend the | ||
| 84 | [indexed DB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API). | ||
| 85 | This example only works in the browser, as other runtimes (such as | ||
| 86 | Node.js) require different backends. | ||
| 87 | |||
| 88 | In this example we make use for the first time of the `--pre-js` option of | ||
| 89 | the compiler to include custom JavaScript code that is run when our module | ||
| 90 | loads. Moreover, the C code is split into multiple files for convenience. | ||
