blob: 5ea26d914736fd1f8ae3ffc5f135b50344d55e22 (
plain)
1
2
3
4
5
6
7
8
9
|
#include <stdio.h>
#include <emscripten.h>
int main()
{
printf("you should not see this text when in a worker!\n"); // this should not crash, but also should not show up anywhere if you are in a worker
emscripten_run_script("if (typeof postMessage !== 'undefined') { postMessage('hello from worker!') }");
}
|