Skip to content

Is there an events list somewhere in the documentation? #888

Answered by SuperMaxusa
flavi1 asked this question in Q&A
Discussion options

You must be logged in to vote

If not, I just want to make a progress bar for the initial state file loading.
How to start to do it?

most likely you need to use "download_progress" event for this as here:

v86/src/browser/main.js

Lines 1429 to 1432 in b81df77

emulator.add_listener("download-progress", function(e)
{
show_progress(e);
});

v86/src/browser/main.js

Lines 78 to 92 in b81df77

if(e.total && typeof e.loaded === "number")
{
var per100 = Math.floor(e.loaded / e.total * 100);
per100 = Math.min(100, Math.max(0, per100));
var per50 = Math.floor(per100 / 2);
line += per100 + "% [";
line += "#".repeat(per50);
line += " ".repeat(50

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@flavi1
Comment options

Answer selected by flavi1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants