Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/jsdom/lib/jsdom/living/aborting/ drwxr-xr-x |
Viewing file: Select action/file-type: "use strict"; const { setupForSimpleEventAccessors } = require("../helpers/create-event-accessor"); const { fireAnEvent } = require("../helpers/events"); const EventTargetImpl = require("../events/EventTarget-impl").implementation; const AbortSignal = require("../generated/AbortSignal"); const DOMException = require("domexception/webidl2js-wrapper"); class AbortSignalImpl extends EventTargetImpl { constructor(globalObject, args, privateData) { super(globalObject, args, privateData); // make event firing possible this._ownerDocument = globalObject.document; this.reason = undefined; this.abortAlgorithms = new Set(); } get aborted() { return this.reason !== undefined; } static abort(globalObject, reason) { const abortSignal = AbortSignal.createImpl(globalObject, []); if (reason !== undefined) { abortSignal.reason = reason; } else { abortSignal.reason = DOMException.create(globalObject, ["The operation was aborted.", "AbortError"]); } return abortSignal; } _signalAbort(reason) { if (this.aborted) { return; } if (reason !== undefined) { this.reason = reason; } else { this.reason = DOMException.create(this._globalObject, ["The operation was aborted.", "AbortError"]); } for (const algorithm of this.abortAlgorithms) { algorithm(); } this.abortAlgorithms.clear(); fireAnEvent("abort", this); } _addAlgorithm(algorithm) { if (this.aborted) { return; } this.abortAlgorithms.add(algorithm); } _removeAlgorithm(algorithm) { this.abortAlgorithms.delete(algorithm); } } setupForSimpleEventAccessors(AbortSignalImpl.prototype, ["abort"]); module.exports = { implementation: AbortSignalImpl }; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]-- |