* @returns {void}
()
| 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 | * |
nothing calls this directly
no test coverage detected