office-gobmx/static/emscripten
Stephan Bergmann e952204b40 Emscripten: Establish a channel between browser and LO main threads
...to be used by external code, to mitigate the issue mentioned in the commit
message of cccc983eb3 "Emscripten: Run external
code on LO's main thread":  "Alternatively, running external code on the
browser's main thread rather than on LO's main thread could be more ideal in the
sense that the external code would then have access to the browser's document
object."

On the browser main thread, external JS code can now await a Module.uno_main
Promise that provides one port of a MessageChannel.  And on the LO main thread,
external JS code has access to the other port of that MessageChannel as
Module.uno_mainPort.  (And the external code is completely free in what
onmessage handlers to set up and what form of postMessage calls to use on those
two MessagePorts.)

Change-Id: Iab6bc7676c744eacb70ddd9f3f80f64e9efd1cf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171907
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-08-15 17:16:27 +02:00
..
environment.js Emscripten: Move the Qt event loop off the JS main thread 2024-08-12 16:31:35 +02:00
favicon.ico
uno.js Emscripten: Establish a channel between browser and LO main threads 2024-08-15 17:16:27 +02:00