Interface Navigator
interface Navigator {
appCodeName: string;
appName: string;
appVersion: string;
clipboard: Clipboard;
cookieEnabled: boolean;
credentials: CredentialsContainer;
doNotTrack: string;
geolocation: Geolocation;
hardwareConcurrency: number;
language: string;
languages: readonly string[];
locks: LockManager;
maxTouchPoints: number;
mediaCapabilities: MediaCapabilities;
mediaDevices: MediaDevices;
mediaSession: MediaSession;
mimeTypes: MimeTypeArray;
onLine: boolean;
pdfViewerEnabled: boolean;
permissions: Permissions;
platform: string;
plugins: PluginArray;
product: string;
productSub: string;
serviceWorker: ServiceWorkerContainer;
storage: StorageManager;
userActivation: UserActivation;
userAgent: string;
vendor: string;
vendorSub: string;
wakeLock: WakeLock;
webdriver: boolean;
xr?: XRSystem;
canShare(data?: ShareData): boolean;
clearAppBadge(): Promise<void>;
getGamepads(): Gamepad[];
javaEnabled(): boolean;
registerProtocolHandler(scheme: string, url: string | URL): void;
requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: MediaKeySystemConfiguration[],
): Promise<MediaKeySystemAccess>;
requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: Iterable<MediaKeySystemConfiguration>,
): Promise<MediaKeySystemAccess>;
requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>;
sendBeacon(url: string | URL, data?: BodyInit): boolean;
setAppBadge(contents?: number): Promise<void>;
share(data?: ShareData): Promise<void>;
vibrate(pattern: VibratePattern): boolean;
vibrate(pattern: Iterable<number>): boolean;
}
appCodeName: string;
appName: string;
appVersion: string;
clipboard: Clipboard;
cookieEnabled: boolean;
credentials: CredentialsContainer;
doNotTrack: string;
geolocation: Geolocation;
hardwareConcurrency: number;
language: string;
languages: readonly string[];
locks: LockManager;
maxTouchPoints: number;
mediaCapabilities: MediaCapabilities;
mediaDevices: MediaDevices;
mediaSession: MediaSession;
mimeTypes: MimeTypeArray;
onLine: boolean;
pdfViewerEnabled: boolean;
permissions: Permissions;
platform: string;
plugins: PluginArray;
product: string;
productSub: string;
serviceWorker: ServiceWorkerContainer;
storage: StorageManager;
userActivation: UserActivation;
userAgent: string;
vendor: string;
vendorSub: string;
wakeLock: WakeLock;
webdriver: boolean;
xr?: XRSystem;
canShare(data?: ShareData): boolean;
clearAppBadge(): Promise<void>;
getGamepads(): Gamepad[];
javaEnabled(): boolean;
registerProtocolHandler(scheme: string, url: string | URL): void;
requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: MediaKeySystemConfiguration[],
): Promise<MediaKeySystemAccess>;
requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: Iterable<MediaKeySystemConfiguration>,
): Promise<MediaKeySystemAccess>;
requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>;
sendBeacon(url: string | URL, data?: BodyInit): boolean;
setAppBadge(contents?: number): Promise<void>;
share(data?: ShareData): Promise<void>;
vibrate(pattern: VibratePattern): boolean;
vibrate(pattern: Iterable<number>): boolean;
}
Index
Properties
appCodeName
appName
appVersion
clipboard
cookieEnabled
credentials
doNotTrack
geolocation
hardwareConcurrency
language
languages
locks
maxTouchPoints
mediaCapabilities
mediaDevices
mediaSession
mimeTypes
onLine
pdfViewerEnabled
permissions
platform
plugins
product
productSub
serviceWorker
storage
userActivation
userAgent
vendor
vendorSub
wakeLock
webdriver
xr?
Methods
Properties
ReadonlyappCodeName
appCodeName: string
ReadonlyappName
appName: string
ReadonlyappVersion
appVersion: string
Readonlyclipboard
Available only in secure contexts.
ReadonlycookieEnabled
cookieEnabled: boolean
Readonlycredentials
Available only in secure contexts.
ReadonlydoNotTrack
doNotTrack: string
Readonlygeolocation
ReadonlyhardwareConcurrency
hardwareConcurrency: number
Readonlylanguage
language: string
Readonlylanguages
languages: readonly string[]
Readonlylocks
ReadonlymaxTouchPoints
maxTouchPoints: number
ReadonlymediaCapabilities
ReadonlymediaDevices
Available only in secure contexts.
ReadonlymediaSession
ReadonlymimeTypes
ReadonlyonLine
onLine: boolean
ReadonlypdfViewerEnabled
pdfViewerEnabled: boolean
Readonlypermissions
Readonlyplatform
platform: string
Readonlyplugins
Readonlyproduct
product: string
ReadonlyproductSub
productSub: string
ReadonlyserviceWorker
Available only in secure contexts.
Readonlystorage
ReadonlyuserActivation
ReadonlyuserAgent
userAgent: string
Readonlyvendor
vendor: string
ReadonlyvendorSub
vendorSub: string
ReadonlywakeLock
Readonlywebdriver
webdriver: boolean
Optionalxr
An XRSystem object is the entry point to the API, used to query for XR features available to the user agent and initiate communication with XR hardware via the creation of XRSessions.
Methods
canShare
clearAppBadge
getGamepads
javaEnabled
registerProtocolHandler
requestMediaKeySystemAccess
- requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: MediaKeySystemConfiguration[],
): Promise<MediaKeySystemAccess> Available only in secure contexts.
Parameters
- keySystem: string
- supportedConfigurations: MediaKeySystemConfiguration[]
Returns Promise<MediaKeySystemAccess>
- requestMediaKeySystemAccess(
keySystem: string,
supportedConfigurations: Iterable<MediaKeySystemConfiguration>,
): Promise<MediaKeySystemAccess> Available only in secure contexts.
Parameters
- keySystem: string
- supportedConfigurations: Iterable<MediaKeySystemConfiguration>
Returns Promise<MediaKeySystemAccess>
requestMIDIAccess
- requestMIDIAccess(options?: MIDIOptions): Promise<MIDIAccess>
Available only in secure contexts.
Parameters
Optionaloptions: MIDIOptions
Returns Promise<MIDIAccess>
sendBeacon
setAppBadge
share
vibrate
- vibrate(pattern: VibratePattern): boolean
Parameters
- pattern: VibratePattern
Returns boolean
- vibrate(pattern: Iterable<number>): boolean
Parameters
- pattern: Iterable<number>
Returns boolean
Available only in secure contexts.