Header menu logo fable-electron-docs-api

Session Module

Types and nested modules

Type/Module Description

ClearCodeCaches

ClearData

ClearSharedDictionaryCacheForIsolationKey

ClearStorageData

CreateInterruptedDownload

DownloadURL

EnableNetworkEmulation

FileSystemAccessRestricted

FromPartition

FromPath

GetSharedDictionaryInfo

HidDeviceAdded

HidDeviceRemoved

HidDeviceRevoked

LoadExtension

Preconnect

ResolveHost

SelectHidDevice

SelectUsbDevice

SerialPortRevoked

SetBluetoothPairingHandler

SetCertificateVerifyProc

SetDevicePermissionHandler

SetDisplayMediaRequestHandler

SetPermissionCheckHandler

SetPermissionRequestHandler

SetSSLConfig

SetUSBProtectedClassesHandler

UsbDeviceRevoked

IOnExtensionLoaded

Emitted after an extension is loaded. This occurs whenever an extension is added to the "enabled" set of extensions. This includes:* Extensions being loaded from Session.loadExtension.* Extensions being reloaded: * from a crash. * if the extension requested it (chrome.runtime.reload()).

IOnExtensionReady

Emitted after an extension is loaded and all necessary browser state is initialized to support the start of the extension's background page.

IOnExtensionUnloaded

Emitted after an extension is unloaded. This occurs when Session.removeExtension is called.

IOnFileSystemAccessRestricted

IOnHidDeviceAdded

Emitted after navigator.hid.requestDevice has been called and select-hid-device has fired if a new device becomes available before the callback from select-hid-device is called. This event is intended for use when using a UI to ask users to pick a device so that the UI can be updated with the newly added device.

IOnHidDeviceRemoved

Emitted after navigator.hid.requestDevice has been called and select-hid-device has fired if a device has been removed before the callback from select-hid-device is called. This event is intended for use when using a UI to ask users to pick a device so that the UI can be updated to remove the specified device.

IOnHidDeviceRevoked

Emitted after HIDDevice.forget() has been called. This event can be used to help maintain persistent storage of permissions when setDevicePermissionHandler is used.

IOnPreconnect

Emitted when a render process requests preconnection to a URL, generally due to a resource hint.

IOnSelectHidDevice

Emitted when a HID device needs to be selected when a call to navigator.hid.requestDevice is made. callback should be called with deviceId to be selected; passing no arguments to callback will cancel the request. Additionally, permissioning on navigator.hid can be further managed by using ses.setPermissionCheckHandler(handler) and ses.setDevicePermissionHandler(handler).

IOnSelectSerialPort

Emitted when a serial port needs to be selected when a call to navigator.serial.requestPort is made. callback should be called with portId to be selected, passing an empty string to callback will cancel the request. Additionally, permissioning on navigator.serial can be managed by using ses.setPermissionCheckHandler(handler) with the serial permission.

IOnSelectUsbDevice

Emitted when a USB device needs to be selected when a call to navigator.usb.requestDevice is made. callback should be called with deviceId to be selected; passing no arguments to callback will cancel the request. Additionally, permissioning on navigator.usb can be further managed by using ses.setPermissionCheckHandler(handler) and ses.setDevicePermissionHandler(handler).

IOnSerialPortAdded

Emitted after navigator.serial.requestPort has been called and select-serial-port has fired if a new serial port becomes available before the callback from select-serial-port is called. This event is intended for use when using a UI to ask users to pick a port so that the UI can be updated with the newly added port.

IOnSerialPortRemoved

Emitted after navigator.serial.requestPort has been called and select-serial-port has fired if a serial port has been removed before the callback from select-serial-port is called. This event is intended for use when using a UI to ask users to pick a port so that the UI can be updated to remove the specified port.

IOnSerialPortRevoked

Emitted after SerialPort.forget() has been called. This event can be used to help maintain persistent storage of permissions when setDevicePermissionHandler is used.

IOnSpellcheckDictionaryDownloadBegin

Emitted when a hunspell dictionary file starts downloading

IOnSpellcheckDictionaryDownloadFailure

Emitted when a hunspell dictionary file download fails. For details on the failure you should collect a netlog and inspect the download request.

IOnSpellcheckDictionaryDownloadSuccess

Emitted when a hunspell dictionary file has been successfully downloaded

IOnSpellcheckDictionaryInitialized

Emitted when a hunspell dictionary file has been successfully initialized. This occurs after the file has been downloaded.

IOnUsbDeviceAdded

Emitted after navigator.usb.requestDevice has been called and select-usb-device has fired if a new device becomes available before the callback from select-usb-device is called. This event is intended for use when using a UI to ask users to pick a device so that the UI can be updated with the newly added device.

IOnUsbDeviceRemoved

Emitted after navigator.usb.requestDevice has been called and select-usb-device has fired if a device has been removed before the callback from select-usb-device is called. This event is intended for use when using a UI to ask users to pick a device so that the UI can be updated to remove the specified device.

IOnUsbDeviceRevoked

Emitted after USBDevice.forget() has been called. This event can be used to help maintain persistent storage of permissions when setDevicePermissionHandler is used.

IOnWillDownload

Emitted when Electron is about to download item in webContents.Calling event.preventDefault() will cancel the download and item will not be available from next tick of the process.

Type something to start searching.