mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
dom: implement abort signal reason method (#37227)
Implement the `reason` method of `AbortSignal`; part of https://github.com/servo/servo/issues/36935. Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
parent
ad95a74389
commit
b4035cc88e
1 changed files with 3 additions and 2 deletions
|
@ -131,8 +131,9 @@ impl AbortSignalMethods<crate::DomTypeHolder> for AbortSignal {
|
|||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#dom-abortsignal-reason>
|
||||
fn Reason(&self, _: JSContext, _rval: MutableHandleValue) {
|
||||
// TODO
|
||||
fn Reason(&self, _cx: JSContext, mut rval: MutableHandleValue) {
|
||||
// The reason getter steps are to return this’s abort reason.
|
||||
rval.set(self.abort_reason.get());
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#dom-abortsignal-throwifaborted>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue