MCPcopy Index your code
hub / github.com/codenameone/CodenameOne / send

Function send

scripts/run-javascript-headless-browser.mjs:108–116  ·  view source on GitHub ↗
(sessionId, method, params)

Source from the content-addressed store, hash-verified

106 };
107
108 function send(sessionId, method, params) {
109 const id = nextId++;
110 const payload = { id, method, params: params || {} };
111 if (sessionId) payload.sessionId = sessionId;
112 return new Promise((resolve, reject) => {
113 pending.set(id, { resolve, reject });
114 ws.send(JSON.stringify(payload));
115 });
116 }
117
118 await send(null, 'Target.setAutoAttach',
119 { autoAttach: true, flatten: true, waitForDebuggerOnStart: false });

Calls 3

setMethod · 0.65
sendMethod · 0.65
stringifyMethod · 0.45

Tested by

no test coverage detected