emscripten-core / emscripten-core/emscripten

When exactly should `--post-js` code execute?

Open
#25,346 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

In some cases the `--post-js` code executes on load, right after the JS library code is loaded.

In other cases (specifically in the `-sMODULARIZE` case today) the code doesn't run until have instantiation and after the `main` function has run.

We should probably pick one behavior and stick with it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.