MCPcopy Index your code
hub / github.com/nodejs/node / close

Method close

lib/internal/worker/io.js:403–414  ·  view source on GitHub ↗

* @returns {void}

()

Source from the content-addressed store, hash-verified

401 * @returns {void}
402 */
403 close() {
404 if (!isBroadcastChannel(this))
405 throw new ERR_INVALID_THIS('BroadcastChannel');
406 if (this[kHandle] === undefined)
407 return;
408 this[kHandle].off('message', this[kOnMessage]);
409 this[kHandle].off('messageerror', this[kOnMessageError]);
410 this[kOnMessage] = undefined;
411 this[kOnMessageError] = undefined;
412 this[kHandle].close();
413 this[kHandle] = undefined;
414 }
415
416 /**
417 *

Callers

nothing calls this directly

Calls 3

isBroadcastChannelFunction · 0.85
closeMethod · 0.65
offMethod · 0.45

Tested by

no test coverage detected