Magnetic Field Events
Introduction
Use cases
Conformance
Terminology
Security and privacy considerations
Magnetic Field
Attributes
DeviceMagneticFieldEvent Interface
[Constructor (DOMString type, optional DeviceMagneticFieldEventInit eventInitDict)]
interface DeviceMagneticFieldEvent : Event {
readonly attribute double x;
readonly attribute double y;
readonly attribute double z;
};
dictionary DeviceMagneticFieldEventInit : EventInit {
double x;
double y;
double z;
};
Attributes
x of type double, readonly
Ambient magnetic field in the X axis.
y of type double, readonly
Ambient magnetic field in the Y axis.
z of type double, readonly
Ambient magnetic field in the Z axis.
Dictionary DeviceMagneticFieldEventInit Members
x of type double
y of type double
z of type double