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

Function send

packages/react-devtools-core/src/backend.js:144–165  ·  view source on GitHub ↗
(event: string, payload: any, transferable?: Array<any>)

Source from the content-addressed store, hash-verified

142 };
143 },
144 send(event: string, payload: any, transferable?: Array<any>) {
145 if (ws.readyState === ws.OPEN) {
146 if (__DEBUG__) {
147 debug('wall.send()', event, payload);
148 }
149
150 ws.send(JSON.stringify({event, payload}));
151 } else {
152 if (__DEBUG__) {
153 debug(
154 'wall.send()',
155 'Shutting down bridge because of closed WebSocket connection',
156 );
157 }
158
159 if (bridge !== null) {
160 bridge.shutdown();
161 }
162
163 scheduleRetry();
164 }
165 },
166 });
167 bridge.addListener(
168 'updateComponentFilters',

Callers

nothing calls this directly

Calls 3

scheduleRetryFunction · 0.85
debugFunction · 0.70
onMessageFunction · 0.50

Tested by

no test coverage detected