Add PointerEvent interface to Sky

Currently this interface is constructable from script but isn't used internally
by the engine.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/846783003
This commit is contained in:
Adam Barth
2015-01-16 15:35:59 -08:00
parent 1cbce3d266
commit 51b30e16fa
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
Running 1 tests
ok 1 Pointer events should be constructable
1 tests
1 pass
0 fail

View File

@@ -0,0 +1,16 @@
<sky>
<import src="../resources/chai.sky" />
<import src="../resources/mocha.sky" />
<script>
describe("Pointer events", function() {
it("should be constructable", function() {
var event = new PointerEvent("pointerdown", {
kind: "touch",
});
assert.ok(event);
assert.equal(event.kind, "touch");
assert.equal(event.radiusMajor, 0);
});
});
</script>
</sky>