You can call console.log in the worker if you want to just print.
Otherwise, you can postMessage to the main thread, and add a listener
there, and call alert() for that specific message type.

On Tue, Mar 1, 2016 at 8:34 AM, Robert Goulet <[email protected]>
wrote:

> Ok I just learned that we don't have access to DOM in workers, so I can't
> call alert. How can I redirect the alert call to the main thread?
>
>
> On Monday, February 29, 2016 at 3:35:36 PM UTC-5, Robert Goulet wrote:
>>
>> When calling 'alert' function outside of main thread, I get this error in
>> FF Nightly:
>>
>> pthread sent an error! ReferenceError: alert is not defined
>>
>> Is that expected?
>>
>> Thanks
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to