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

Function beforeunload_callback

test/browser/test_html5_core.c:189–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189const char *beforeunload_callback(int eventType, const void *reserved, void *userData) {
190#ifdef REPORT_RESULT
191 return ""; // For test harness, don't show a confirmation dialog to not block and keep the test runner automated.
192#else
193 return "Do you really want to leave the page?";
194#endif
195}
196
197void formatTime(char *str, int seconds) {
198 int h = seconds / (60*60);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected