When calling postMessage many times in a row - like in a loop - without await, there may be sync problems, especially when retrieving the message just sent.
Maybe postMessage should be a synchronous function? I can't think of a safe use case where it would be async.