I'm having trouble communicating with my data or methods with this code,
created() {
document.addEventListener( 'touchstart', function( e ) {
this.myData = e.changedTouches[ 0 ].screenY
}
}
I'm guessing that it's because of the function's scope, .this doesn't work inside the function, but then how do I communicate with my data or activate any methods outside of the event listener function then?