Permalink
Browse files

Set event.target to the real Canvas object

  • Loading branch information...
phoboslab committed Nov 6, 2012
1 parent a7a9268 commit 10bde0b32cc6e08f7405c240c793986d0fb2a682
Showing with 3 additions and 2 deletions.
  1. +3 −2 ejecta.js
View
@@ -30,6 +30,7 @@ window.navigator = {
// Create the default screen canvas
window.canvas = new Ejecta.Canvas();
+window.canvas.type = 'canvas';
// The console object
window.console = {
@@ -183,7 +184,7 @@ window.canvas.removeEventListener = window.removeEventListener = function( type,
var touchInput = null;
var touchEvent = {
type: 'touchstart',
- target: {type:'canvas'},
+ target: canvas,
touches: [],
preventDefault: function(){},
stopPropagation: function(){}
@@ -227,7 +228,7 @@ window.document._eventInitializers.touchstart =
var accelerometer = null;
var deviceMotionEvent = {
type: 'devicemotion',
- target: {type:'canvas'},
+ target: canvas,
acceleration: {x: 0, y: 0, z: 0},
accelerationIncludingGravity: {x: 0, y: 0, z: 0},
preventDefault: function(){},

0 comments on commit 10bde0b

Please sign in to comment.