It will result in this error and the listener function never gets triggered:
TypeError: Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': No function was found that matched the signature provided.
at registerImmediate (set-immediate.js?f31a:66)
at setImmediate (set-immediate.js?f31a:15)
at Object.eval (index.js?74c6:112)
at Object.set (index.js?74c6:75)
Try to run this snipped inside a web worker:
It will result in this error and the listener function never gets triggered: