Skip to content

Commit

Permalink
chore: Add polyfill for AbortSignal.throwIfAborted() (#5412)
Browse files Browse the repository at this point in the history
  • Loading branch information
steveanton authored Jul 12, 2023
1 parent 6d75d89 commit 72e13c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/polyfill/abort_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ class extends shaka.util.FakeEventTarget {
return this.reason_;
}

/** @return {void} */
throwIfAborted() {
if (this.aborted_) {
throw this.reason_;
}
}

/**
* @param {*} reason
* @private
Expand Down

0 comments on commit 72e13c4

Please sign in to comment.