Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #372 from patrickhlauke/master
Browse files Browse the repository at this point in the history
Change DOMException from InvalidPointerId to NotFoundError
  • Loading branch information
patrickhlauke committed Sep 18, 2018
2 parents 395b5fc + 05de7e4 commit 25c3768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/capture.js
Expand Up @@ -4,8 +4,8 @@ var n = window.navigator;
var s, r, h;
function assertActive(id) {
if (!dispatcher.pointermap.has(id)) {
var error = new Error('InvalidPointerId');
error.name = 'InvalidPointerId';
var error = new Error('NotFoundError');
error.name = 'NotFoundError';
throw error;
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/capture.js
Expand Up @@ -39,11 +39,11 @@ define([
});

test('setPointerCapture throw exceptions when the pointerId is not on screen', function() {
expect(function() { set(host); }).to.throw(/InvalidPointerId/);
expect(function() { set(host); }).to.throw(/NotFoundError/);
});

test('releasePointerCapture throws exception when the pointerId is not on screen', function() {
expect(function() { release(host); }).to.throw(/InvalidPointerId/);
expect(function() { release(host); }).to.throw(/NotFoundError/);
});

suite('pointercapture events', function() {
Expand Down

0 comments on commit 25c3768

Please sign in to comment.