* @param {symbol | undefined} dontThrowSymbol * @param {{ * aborted? : boolean, * reason? : any, * transferable? : boolean, * composite? : boolean, * }} [init] * @private
(dontThrowSymbol = undefined, init = kEmptyObject)
| 229 | * @private |
| 230 | */ |
| 231 | constructor(dontThrowSymbol = undefined, init = kEmptyObject) { |
| 232 | if (dontThrowSymbol !== kDontThrowSymbol) { |
| 233 | throw new ERR_ILLEGAL_CONSTRUCTOR(); |
| 234 | } |
| 235 | super(); |
| 236 | |
| 237 | this[kMaxEventTargetListeners] = 0; |
| 238 | const { |
| 239 | aborted = false, |
| 240 | reason = undefined, |
| 241 | transferable = false, |
| 242 | composite = false, |
| 243 | } = init; |
| 244 | this[kAborted] = aborted; |
| 245 | this[kReason] = reason; |
| 246 | this[kComposite] = composite; |
| 247 | if (transferable) { |
| 248 | markTransferMode(this, false, true); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | /** |
| 253 | * @type {boolean} |
nothing calls this directly
no test coverage detected