Definitely try a local server, like python -m SimpleHTTPServer , because file:/// URLs might not allow IDB access.
Another thing that might be useful is to look at the IDBFS examples in the test suite, which are known to work. On Tue, Jul 28, 2015 at 3:09 AM, Guillaume Leclerc < [email protected]> wrote: > Hello, > > I was trying to use IDBFS but I can't get it to be persistent. > > I run the following in the console (of firefox) > > FS.mkdir("/test"); > FS.mount(IDBFS, {}, "/test"); > FS.syncfs(true, console.log.bind(console)); > //wait the callback to be called > FS.mkdir("/test/test2"); > FS.syncfs(true, console.log.bind(console)); > //wait the callback to be called > // reload the page > FS.mkdir("/test"); > FS.mount(IDBFS, {}, "/test"); > FS.syncfs(true, console.log.bind(console)); > //wait the callback to be called > FS.readdir("/test"); > // ==> Outputs ["..", "."] > > Im I doing something wrong ? > Is it because It is local html file (maybe I must use a web-server) > > Thank you for your help > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
