Not TestedTesting not done, may not work properly
Device & Sensors

Magnetometer Sensor

Generic Sensor API measuring magnetic field intensity.

Checking support...
Advertisement

Interactive Input Workspace

Ready for input

Web API Execution Output

Result output will be displayed here after processing...

Native JavaScript Code Example (Zero Libraries)

if ('Magnetometer' in window) {
  const mag = new Magnetometer();
  mag.start();
}

About the Magnetometer Sensor Web API

Magnetometer interface measures magnetic fields around the 3 physical axes.

Specification:W3C & WHATWG Web API Standard
Sponsored Content