diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-04-03 22:11:42 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-04-03 22:11:42 +0100 |
| commit | 4de5d20368d4b2ca4f0851eafa900cd0c9a3c691 (patch) | |
| tree | aacb7725e4fa3f31994be29b0c87abf9a808d2e4 /loopgen.c | |
| parent | 36c282aaa92bd42d570cdc76fe3b9e76d8da1ff1 (diff) | |
| download | puzzles-4de5d20368d4b2ca4f0851eafa900cd0c9a3c691.zip puzzles-4de5d20368d4b2ca4f0851eafa900cd0c9a3c691.tar.gz puzzles-4de5d20368d4b2ca4f0851eafa900cd0c9a3c691.tar.bz2 puzzles-4de5d20368d4b2ca4f0851eafa900cd0c9a3c691.tar.xz | |
js: use the "load" event for loading save files
This is in place of the "loadend" event. In Chromium, (and in the
specification), "loadend" is triggered not only when the file is
loaded but also when loading fails. Obviously when loading fails we
don't want to try to parse the (nonexistent) resulting file.
Using the "load" event works better, since it's only fired on success,
and we can also have an "error" handler to report problems with
loading files, albeit with no detail at all.
This doesn't seem to make any difference in Firefox, which in my
testing fires "load" and "loadend" on success and nothing at all on
failure.
Diffstat (limited to 'loopgen.c')
0 files changed, 0 insertions, 0 deletions