DeviceOrientationEvent: DeviceOrientationEvent() コンストラクター
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (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> |
ブラウザーの互換性
Loading…