SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

244237 0 30 JavaScript
'use strict';
export function patchMessageChannel() {
global.MessageChannel = class {
constructor() {
const port1 = {
onmesssage: () => {},
};
this.port1 = port1;
this.port2 = {
postMessage(msg) {
setTimeout(() => {
port1.onmessage(msg);
}, 0);
},
};
}
};
}