building a html canvas page in react-native webview. everything seem fine except the canvas.addEventListener
call the call back with empty event object
var moveEvents = ["mousemove", "touchmove"]
moveEvents.forEach(function (moveEvent) {
canvas.addEventListener(moveEvent, function(e) {
console.log(e) // {}
mouse.x = e.pageX - this.offsetLeft;
mouse.y = e.pageY - this.offsetTop;
}, false);
don't know what could possible be wrong this behavior is only noticed on react-native here is the code working as expected on jsfiddle