- From: Domenic Denicola <notifications@github.com>
- Date: Thu, 08 Jun 2017 05:43:52 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 8 June 2017 12:44:32 UTC
domenic commented on this pull request. > + {{DOMException}}. + <li>Reject immediately if the {{AbortSignal}}'s [=AbortSignal/aborted flag=] is already set, + otherwise: + <li>Use the [=AbortSignal/abort algorithms=] mechanism to observe changes to the {{AbortSignal}} + object and do so in a manner that does not lead to clashes with other observers. +</ul> + +<div class=example id=aborting-ongoing-activities-spec-example> + The steps for a promise-returning method <code>doAmazingness(options)</code> could be as follows: + + <ol> + <li>Let |p| be [=a new promise=]. + <li>If |options|' <code>signal</code> member is present, then: + <ol> + <li>If |options|' <code>signal</code>'s [=AbortSignal/aborted flag=] is set, throw an + "{{AbortError}}" {{DOMException}}. IMO relying on automatically turning things into a rejection is a spec bug that Web IDL catches for you. We should go with @jyasskin's suggestion instead. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/437#discussion_r120877134
Received on Thursday, 8 June 2017 12:44:32 UTC