mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Issue #2676 - Implement AbortSignal.abort()
This commit is contained in:
parent
949e3f0ac6
commit
9fa4b6fd5d
3 changed files with 9 additions and 2 deletions
|
|
@ -43,6 +43,12 @@ AbortSignal::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|||
return AbortSignalBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
already_AddRefed<AbortSignal> AbortSignal::Abort(GlobalObject& aGlobal) {
|
||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
RefPtr<AbortSignal> abortSignal = new AbortSignal(global, true);
|
||||
return abortSignal.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
AbortSignal::Aborted() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ public:
|
|||
bool
|
||||
Aborted() const;
|
||||
|
||||
void
|
||||
Abort();
|
||||
void Abort();
|
||||
|
||||
IMPL_EVENT_HANDLER(abort);
|
||||
static already_AddRefed<AbortSignal> Abort(GlobalObject& aGlobal);
|
||||
|
||||
void
|
||||
AddFollower(Follower* aFollower);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
[Exposed=(Window,Worker),
|
||||
Func="AbortController::IsEnabled"]
|
||||
interface AbortSignal : EventTarget {
|
||||
[NewObject] static AbortSignal abort();
|
||||
readonly attribute boolean aborted;
|
||||
|
||||
attribute EventHandler onabort;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue