MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/browser/separate_metadata_later.cpp:12–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12int main() {
13 EM_ASM({
14 setTimeout(function() {
15 // hijack run dep logic to see when the metadata is loaded ok.
16 var real = Module["removeRunDependency"];
17 Module["removeRunDependency"] = function(id) {
18 real(id);
19 if (id === "more.js.metadata") {
20 Module["_finish"]();
21 }
22 };
23 function loadChildScript(name, then) {
24 var js = document.createElement("script");
25 if (then) js.onload = then;
26 js.src = name;
27 document.body.appendChild(js);
28 }
29 loadChildScript("more.js");
30 }, 1);
31 });
32}
33

Callers

nothing calls this directly

Calls 3

loadChildScriptFunction · 0.85
EM_ASMFunction · 0.70
functionFunction · 0.50

Tested by

no test coverage detected