add web sync files and key events

This commit is contained in:
2019-10-11 00:44:11 +02:00
parent e6e3488291
commit babbfb36a7
9 changed files with 211 additions and 23 deletions

View File

@@ -1,3 +1,13 @@
function js_sync() {
if (Module.js_fs_synching)
return;
Module.js_fs_synching = true;
FS.syncfs(function (err) {
console.log("syncFS result:");
console.log(err);
Module.js_fs_synching = false;
});
}
function js_pick_file(fn) {
var input = document.createElement('input');
input.type = 'file';
@@ -55,6 +65,7 @@ function js_pick_file_save(path, name, fn) {
}
mergeInto(LibraryManager.library, {
js_sync: js_sync,
js_pick_file: js_pick_file,
js_pick_file_save: js_pick_file_save,
});