summaryrefslogtreecommitdiffstats
path: root/platform/javascript/native/utils.js
Commit message (Collapse)AuthorAgeFilesLines
* [HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli2020-11-101-292/+0
| | | | | | | | | The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
* [HTML5] Close IDBFS database on exit.Fabio Alessandrelli2020-10-141-3/+18
| | | | | | | This should be made available in emscripten in a decent way. Possibly after unmount, to free the database lock and allow performing operations on it from javascript after the Emscripten Runtime has exited.
* JS synchronous start, better persistent FS sync.Fabio Alessandrelli2020-09-231-1/+33
| | | | | | | | | | | | | | The engine now expects to emscripten FS to be setup and sync-ed before main is called. This is exposed via `Module["initFS"]` which also allows to setup multiple persistence paths (internal use only for now). Additionally, FS syncing is done **once** for every loop if at least one file in a persistent path was open for writing and closed, and if the FS is not syncing already. This should potentially fix issues reported by users where "autosave" would not work on the web (never calling `syncfs` because of too many writes).
* Small refactor to JavaScript handlers.Fabio Alessandrelli2020-09-231-0/+41
| | | | | Crated helper class in native/utils.js. Simplify code in OS/DisplayServer.
* Add drop files functionFabio Alessandrelli2020-05-101-0/+156
|
* Fix Closure compiler build, python style.Fabio Alessandrelli2020-05-101-0/+48
Move copyToFS into utils.js library included with '--pre-js'.