Skip to content

Commit

Permalink
Export DOMException for instanceof checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 23, 2018
1 parent f035860 commit 2bd7f22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Response.redirect = function(url, status) {
return new Response(null, {status: status, headers: {location: url}})
}

var DOMException = self.DOMException
export var DOMException = self.DOMException
try {
new DOMException()
} catch (err) {
Expand Down
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,7 @@ exercise.forEach(function(exerciseMode) {
assert.ok(false)
},
function(error) {
assert.instanceOf(error, WHATWGFetch.DOMException)
assert.equal(error.name, 'AbortError')
}
)
Expand Down

0 comments on commit 2bd7f22

Please sign in to comment.