MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / sendResponse

Function sendResponse

javascript/atoms/inject.js:330–349  ·  view source on GitHub ↗
(status, value)

Source from the content-addressed store, hash-verified

328 var responseSent = false;
329
330 function sendResponse(status, value) {
331 if (!responseSent) {
332 if (win.removeEventListener) {
333 win.removeEventListener('unload', onunload, true);
334 } else {
335 win.detachEvent('onunload', onunload);
336 }
337
338 win.clearTimeout(timeoutId);
339 if (status != bot.ErrorCode.SUCCESS) {
340 var err = new bot.Error(status, value.message || value + '');
341 err.stack = value.stack;
342 value = bot.inject.wrapError(err);
343 } else {
344 value = bot.inject.wrapResponse(value);
345 }
346 onDone(opt_stringify ? bot.json.stringify(value) : value);
347 responseSent = true;
348 }
349 }
350 var sendError = goog.utils.partial(sendResponse, bot.ErrorCode.UNKNOWN_ERROR);
351
352 if (win.closed) {

Callers 2

inject.jsFile · 0.85
onunloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected