MCPcopy
hub / github.com/facebook/react / onMessage

Function onMessage

packages/react-devtools-inline/src/backend.js:115–117  ·  view source on GitHub ↗
({data}: $FlowFixMe)

Source from the content-addressed store, hash-verified

113 wall = {
114 listen(fn) {
115 const onMessage = ({data}: $FlowFixMe) => {
116 fn(data);
117 };
118 contentWindow.addEventListener('message', onMessage);
119 return () => {
120 contentWindow.removeEventListener('message', onMessage);

Callers 2

fireMessageEventFunction · 0.50
sendFunction · 0.50

Calls 1

fnFunction · 0.50

Tested by 1

fireMessageEventFunction · 0.40