diff --git a/lib/polyfill/abort_controller.js b/lib/polyfill/abort_controller.js index 3ebf1acc6e..ddb5fe3c66 100644 --- a/lib/polyfill/abort_controller.js +++ b/lib/polyfill/abort_controller.js @@ -86,6 +86,13 @@ class extends shaka.util.FakeEventTarget { return this.reason_; } + /** @return {void} */ + throwIfAborted() { + if (this.aborted_) { + throw this.reason_; + } + } + /** * @param {*} reason * @private