mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
dom: implement signal method on abort controller (#37217)
Part of https://github.com/servo/servo/issues/34866 The "Finish current stub for AbortController" item. Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
parent
c28394f476
commit
99add66f8e
2 changed files with 7 additions and 1 deletions
|
@ -69,4 +69,10 @@ impl AbortControllerMethods<crate::DomTypeHolder> for AbortController {
|
||||||
// to signal abort on this with reason if it is given.
|
// to signal abort on this with reason if it is given.
|
||||||
self.signal_abort(cx, reason, can_gc);
|
self.signal_abort(cx, reason, can_gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <https://dom.spec.whatwg.org/#dom-abortcontroller-signal>
|
||||||
|
fn Signal(&self) -> DomRoot<AbortSignal> {
|
||||||
|
// The signal getter steps are to return this’s signal.
|
||||||
|
self.signal.as_rooted()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
interface AbortController {
|
interface AbortController {
|
||||||
constructor();
|
constructor();
|
||||||
|
|
||||||
//[SameObject] readonly attribute AbortSignal signal;
|
[SameObject] readonly attribute AbortSignal signal;
|
||||||
|
|
||||||
undefined abort(optional any reason);
|
undefined abort(optional any reason);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue