Represents various browser permissions that can be granted or denied, such as ‘GEOLOCATION’, ‘CAMERA’, or ‘CLIPBOARD_READ’.

Definition

enum Permission {
  ACCELEROMETER
  AMBIENT_LIGHT_SENSOR
  BACKGROUND_SYNC
  CAMERA
  CLIPBOARD_READ
  CLIPBOARD_WRITE
  GEOLOCATION
  GYROSCOPE
  MAGNETOMETER
  MICROPHONE
  MIDI_SYSEX
  MIDI
  NOTIFICATIONS
  PAYMENT_HANDLER
  STORAGE_ACCESS
}

Values

ACCELEROMETER

Permission to access the device’s accelerometer.

AMBIENT_LIGHT_SENSOR

Permission to access the ambient light sensor.

BACKGROUND_SYNC

Permission to use the background sync API.

CAMERA

Permission to access the camera.

CLIPBOARD_READ

Permission to read from the system clipboard.

CLIPBOARD_WRITE

Permission to write to the system clipboard.

GEOLOCATION

Permission to access the user’s geographical location.

GYROSCOPE

Permission to access the device’s gyroscope.

MAGNETOMETER

Permission to access the device’s magnetometer.

MICROPHONE

Permission to access the microphone.

MIDI_SYSEX

Permission to send and receive MIDI System Exclusive messages.

MIDI

Permission to access MIDI devices.

NOTIFICATIONS

Permission to display web notifications.

PAYMENT_HANDLER

Permission to use the Payment Handler API.

STORAGE_ACCESS

Permission to access storage for unpartitioned cookies and other site data under the Storage Access API.