DeviceOrientationEvent: DeviceOrientationEvent() コンストラクター
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
DeviceOrientationEvent()
コンストラクターは、新しい DeviceOrientationEvent
オブジェクトを作成します。
構文
js
new DeviceOrientationEvent(type)
new DeviceOrientationEvent(type, options)
引数
type
-
文字列で、このイベントの名前です。 大文字小文字の区別があり、ブラウザーは
deviceorientation
またはdeviceorientationabsolute
に設定します。 後者の場合、options.absolute
は常にtrue
です。 options
省略可-
オブジェクトで、
Event()
で定義されているプロパティに加え、以下のプロパティを持つことができます。
返値
新しい DeviceOrientationEvent
オブジェクトです。
仕様書
Specification |
---|
Device Orientation and Motion # dom-deviceorientationevent-deviceorientationevent |