Menu

Enum

Permission

kurogane::PermissionSource
#[non_exhaustive] pub enum Permission { Camera, Microphone, ScreenVideo, ScreenAudio, Geolocation, Notifications, ClipboardRead, MidiSysex, CameraPanTiltZoom, ArSession, VrSession, HandTracking, CapturedSurfaceControl, StorageAccess, TopLevelStorageAccess, DiskQuota, LocalFonts, IdentityProvider, IdleDetection, KeyboardLock, PointerLock, ProtectedMediaIdentifier, RegisterProtocolHandler, WebAppInstallation, WindowManagement, FileSystemAccess, LocalNetwork, LoopbackNetwork, Sensors, }

What a page asks for, in a PermissionRequest.

Variants

#Camera

A camera (getUserMedia with video).

#Microphone

A microphone (getUserMedia with audio).

#ScreenVideo

A picture of the screen (getDisplayMedia). There is no picker; once allowed the page records the whole screen.

#ScreenAudio

The sound the system plays, with a picture of the screen.

#Geolocation

The device’s location (navigator.geolocation).

#Notifications

Showing notifications (Notification.requestPermission).

#ClipboardRead

Reading the clipboard (navigator.clipboard.readText and read).

#MidiSysex

MIDI devices with system-exclusive messages (requestMIDIAccess({ sysex: true })).

#CameraPanTiltZoom

Turning a camera (pan, tilt and zoom).

#ArSession

An augmented-reality session (WebXR).

#VrSession

A virtual-reality session (WebXR).

#HandTracking

Tracking the user’s hands in a WebXR session.

#CapturedSurfaceControl

Scrolling and zooming a captured tab or window.

#StorageAccess

An embedded site’s own cookies and storage inside another site’s page (document.requestStorageAccess).

#TopLevelStorageAccess

A site’s own cookies and storage inside the pages of other sites, asked for by the site itself (requestStorageAccessFor).

#DiskQuota

More disk space for the site’s storage.

#LocalFonts

The fonts installed on the system (queryLocalFonts).

#IdentityProvider

Signing in with the site as an identity provider (FedCM).

#IdleDetection

Whether the user is idle (IdleDetector).

#KeyboardLock

Keys the system would otherwise take, such as Alt+Tab (navigator.keyboard.lock).

#PointerLock

Holding the pointer inside the page (requestPointerLock).

#ProtectedMediaIdentifier

An identifier for playing protected media.

#RegisterProtocolHandler

Handling links of a URL scheme (registerProtocolHandler).

#WebAppInstallation

Installing the site as an app.

#WindowManagement

The screens’ layout and placing windows on them (getScreenDetails).

#FileSystemAccess

Writing to files and folders the user picked (File System Access).

#LocalNetwork

Reaching devices on the local network.

#LoopbackNetwork

Reaching services on this computer.

#Sensors

Motion and orientation sensors.

Trait implementations