Skip to content

Commit

Permalink
[#894] generate custom event based on browser support
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Jul 10, 2017
1 parent 65bf73d commit 441faf6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/spec/input-spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
describe("me.input", function () {

var renderable;
var evenType;
beforeAll(function () {
renderable = new me.Entity(0, 0, {
"width" : 32,
"height" : 32
});
if (me.device.pointerEvent) {
evenType = "pointerdown";
} else {
evenType ="mousedown"
}
});

describe("Pointer Event", function () {
Expand Down Expand Up @@ -34,7 +40,7 @@ describe("me.input", function () {
});

// Create the event.
var event = new CustomEvent("mousedown");
var event = new CustomEvent(evenType);

// configure the event
event.pointerId = 1;
Expand Down

0 comments on commit 441faf6

Please sign in to comment.