MCPcopy
hub / github.com/mailvelope/mailvelope / connect

Function connect

test/integration/__mocks__/chrome-api-setup.js:280–292  ·  view source on GitHub ↗
({name})

Source from the content-addressed store, hash-verified

278 }
279 },
280 connect({name}) {
281 const senderPort = Port.connect({name}, receiverPort => {
282 if (!listeners.length) {
283 pendingPorts.push(receiverPort);
284 return;
285 }
286 for (const listener of listeners) {
287 listener(receiverPort);
288 }
289 });
290 connectedPorts.push(senderPort);
291 return senderPort;
292 },
293 _connectedPorts: connectedPorts,
294 onMessage: {
295 addListener() {}

Callers

nothing calls this directly

Calls 2

connectMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected