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

Function main

test/embind/test_optional_val_main.cpp:13–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11};
12
13int main() {
14 EM_ASM(
15 let value = new Module.MyType();
16 value.RunCallback((e) => {
17 console.log("Received: " + e);
18 if (e !== "Hey") throw "Expected 'Hey', got " + e;
19 });
20 );
21 std::cout << "done" << std::endl;
22}
23
24EMSCRIPTEN_BINDINGS(my_module) {
25 register_optional<std::string>();

Callers

nothing calls this directly

Calls 2

RunCallbackMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected