メモ window.addEventListener('touchstart', function foo(e) { alert(e)//object touchevent alert(e.target)//object htmldivelement alert(this)//object window これが正しい参照だった this.removeEventListener('touchstart',foo); }); ■iOS12.2からsafariでジャイロのチェック入れないと動かない。 PCのようにorbitcontrol(sp=false)でやるか、iOS13以降の DeviceMotionEvent.requestPermission()で許可させる。 ただしクリックイベントに入れる必要あり。要はユーザーアクションで許可させる。 *許可/拒否は一度選択するとキャッシュされるから