MCPcopy Create free account
hub / github.com/Snapchat/djinni / EM_JS

Function EM_JS

test-suite/generated-src/wasm/NativeColor.cpp:10–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9namespace {
10 EM_JS(void, djinni_init_testsuite_color_consts, (), {
11 Module.testsuite_Color = {
12 RED : 0,
13 ORANGE : 1,
14 YELLOW : 2,
15 GREEN : 3,
16 BLUE : 4,
17 /**
18 * "It is customary to list indigo as a color lying between blue and violet, but it has
19 * never seemed to me that indigo is worth the dignity of being considered a separate
20 * color. To my eyes it seems merely deep blue." --Isaac Asimov
21 */
22 INDIGO : 5,
23 VIOLET : 6,
24 }
25 })
26}
27
28void NativeColor::staticInitializeConstants() {
29 static std::once_flag initOnce;
30 std::call_once(initOnce, [] {
31 djinni_init_testsuite_color_consts();
32 ::djinni::djinni_register_name_in_ns("testsuite_Color", "testsuite.Color");
33 });
34}
35
36EMSCRIPTEN_BINDINGS(testsuite_color) {
37 NativeColor::staticInitializeConstants();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected