1 JavaScript callbacks invoked from non-main threads must eventually be scheduled to run on the main thread to prevent race conditions and ensure DOM consistency.
“we queue a task and we queue a task to get back on to the main thread at some point and now we're calling JavaScript on the thread where JavaScript lives, so it all works.”