abortcontroller: implement signal

Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com>
This commit is contained in:
gterzian 2025-06-02 19:15:12 +07:00
parent 2a07ef01f5
commit 2c758be4cd
No known key found for this signature in database
GPG key ID: E290318CF2FC84D3
2 changed files with 7 additions and 1 deletions

View file

@ -69,4 +69,10 @@ impl AbortControllerMethods<crate::DomTypeHolder> for AbortController {
// to signal abort on this with reason if it is given.
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 thiss signal.
self.signal.as_rooted()
}
}

View file

@ -7,7 +7,7 @@
interface AbortController {
constructor();
//[SameObject] readonly attribute AbortSignal signal;
[SameObject] readonly attribute AbortSignal signal;
undefined abort(optional any reason);
};