Detect whether postMessage needs an origin or is a MessagePort.