在react-native webview中构建html canvas页面。一切似乎罚款除外canvas.addEventListener
电话回拨空事件对象反应原生webview事件侦听器将空事件对象传递给回调
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);
不知道什么能可能是错误的 这种行为只注意到了反应母语这里是jsfiddle
按预期工作的代码
有没有想过这一个? –