Header menu logo fable-electron-docs-api

Types Module

Types and nested modules

Type/Module Description

BaseWindowConstructorOptions (Module)

BrowserWindowConstructorOptions (Module)

CustomScheme (Module)

HIDDevice (Module)

IpcMainEvent (Module)

IpcMainServiceWorkerEvent (Module)

OffscreenSharedTexture (Module)

PrinterInfo (Module)

SharedTextureHandle (Module)

Transaction (Module)

USBDevice (Module)

WebPreferences (Module)

BaseWindowConstructorOptions (Type)

When setting minimum or maximum window size with minWidth/maxWidth/ minHeight/maxHeight, it only constrains the users. It won't prevent you from passing a size that does not follow size constraints to setBounds/setSize or to the constructor of BrowserWindow.The possible values and behaviors of the type option are platform dependent. Possible values are:* On Linux, possible types are desktop, dock, toolbar, splash, notification. * The desktop type places the window at the desktop background window level (kCGDesktopWindowLevel - 1). However, note that a desktop window will not receive focus, keyboard, or mouse events. You can still use globalShortcut to receive input sparingly. * The dock type creates a dock-like window behavior. * The toolbar type creates a window with a toolbar appearance. * The splash type behaves in a specific way. It is not draggable, even if the CSS styling of the window's body contains -webkit-app-region: drag. This type is commonly used for splash screens. * The notification type creates a window that behaves like a system notification.* On macOS, possible types are desktop, textured, panel. * The textured type adds metal gradient appearance. This option is deprecated. * The desktop type places the window at the desktop background window level (kCGDesktopWindowLevel - 1). Note that desktop window will not receive focus, keyboard or mouse events, but you can use globalShortcut to receive input sparingly. * The panel type enables the window to float on top of full-screened apps by adding the NSWindowStyleMaskNonactivatingPanel style mask, normally reserved for NSPanel, at runtime. Also, the window will appear on all spaces (desktops).* On Windows, possible type is toolbar.

BluetoothDevice

BrowserWindowConstructorOptions (Type)

CPUUsage

Certificate

CertificatePrincipal

ColorSpace

Cookie

CrashReport

CustomScheme (Type)

DesktopCapturerSource

Display

The Display object represents a physical display connected to the system. A fake Display may exist on a headless system, or a Display may correspond to a remote, virtual display.

Extension

ExtensionInfo

FileFilter

FilePathWithHeaders

FilesystemPermissionRequest

GPUFeatureStatus

Possible values:* disabled_software - Software only. Hardware acceleration disabled (yellow)* disabled_off - Disabled (red)* disabled_off_ok - Disabled (yellow)* unavailable_software - Software only, hardware acceleration unavailable (yellow)* unavailable_off - Unavailable (red)* unavailable_off_ok - Unavailable (yellow)* enabled_readback - Hardware accelerated but at reduced performance (yellow)* enabled_force - Hardware accelerated on all pages (green)* enabled - Hardware accelerated (green)* enabled_on - Enabled (green)* enabled_force_on - Force enabled (green)

HIDDevice (Type)

InputEvent

IpcMainEvent (Type)

IpcMainInvokeEvent

IpcMainServiceWorkerEvent (Type)

IpcMainServiceWorkerInvokeEvent

IpcRendererEvent

JumpListCategory

[!NOTE] If a JumpListCategory object has neither the type nor the name property set then its type is assumed to be tasks. If the name property is set but the type property is omitted then the type is assumed to be custom.> [!NOTE] The maximum length of a Jump List item's description property is 260 characters. Beyond this limit, the item will not be added to the Jump List, nor will it be displayed.

JumpListItem

KeyboardEvent

KeyboardInputEvent

MediaAccessPermissionRequest

MemoryInfo

Note that all statistics are reported in Kilobytes.

MemoryUsageDetails

MimeTypedBuffer

MouseInputEvent

MouseWheelInputEvent

NavigationEntry

NotificationAction

NotificationResponse

OffscreenSharedTexture (Type)

OpenExternalPermissionRequest

PaymentDiscount

PermissionRequest

Point

[!NOTE] Both x and y must be whole integers, when providing a point object as input to an Electron API we will automatically round your x and y values to the nearest whole integer.

PostBody

PreloadScript

PreloadScriptRegistration

PrinterInfo (Type)

ProcessMemoryInfo

ProcessMetric

Product

ProductDiscount

ProductSubscriptionPeriod

ProtocolRequest

ProtocolResponse

ProtocolResponseUploadData

ProxyConfig

When mode is unspecified, pacScript and proxyRules are provided together, the proxyRules option is ignored and pacScript configuration is applied.The proxyRules has to follow the rules below:For example:* http=foopy:80;ftp=foopy2 - Use HTTP proxy foopy:80 for http:// URLs, and HTTP proxy foopy2:80 for ftp:// URLs.* foopy:80 - Use HTTP proxy foopy:80 for all URLs.* foopy:80,bar,direct:// - Use HTTP proxy foopy:80 for all URLs, failing over to bar if foopy:80 is unavailable, and after that using no proxy.* socks4://foopy - Use SOCKS v4 proxy foopy:1080 for all URLs.* http=foopy,socks5://bar.com - Use HTTP proxy foopy for http URLs, and fail over to the SOCKS5 proxy bar.com if foopy is unavailable.* http=foopy,direct:// - Use HTTP proxy foopy for http URLs, and use no proxy if foopy is unavailable.* http=foopy;socks=foopy2 - Use HTTP proxy foopy for http URLs, and use socks4://foopy2 for all other URLs.The proxyBypassRules is a comma separated list of rules described below:* [ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" ]Match all hostnames that match the pattern HOSTNAME_PATTERN.Examples: "foobar.com", "foobar.com", ".foobar.com", "foobar.com:99", "https://x..y.com:99"* "." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]Match a particular domain suffix.Examples: ".google.com", ".com", "http://.google.com"* [ SCHEME "://" ] IP_LITERAL [ ":" PORT ]Match URLs which are IP address literals.Examples: "127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"* IP_LITERAL "/" PREFIX_LENGTH_IN_BITSMatch any URL that is to an IP literal that falls between the given range. IP range is specified using CIDR notation.Examples: "192.168.1.1/16", "fefe:13::abc/33".* Match local addresses. The meaning of is whether the host matches one of: "127.0.0.1", "::1", "localhost".

Rectangle

Referrer

RenderProcessGoneDetails

ResolvedEndpoint

ResolvedHost

ScrubberItem

SegmentedControlSegment

SerialPort

ServiceWorkerInfo

SharedDictionaryInfo

SharedDictionaryUsageInfo

SharedTextureHandle (Type)

SharedWorkerInfo

SharingItem

ShortcutDetails

Size

Task

ThumbarButton

The flags is an array that can include following strings:* enabled - The button is active and available to the user.* disabled - The button is disabled. It is present, but has a visual state indicating it will not respond to user action.* dismissonclick - When the button is clicked, the thumbnail window closes immediately.* nobackground - Do not draw a button border, use only the image.* hidden - The button is not shown to the user.* noninteractive - The button is enabled but not interactive; no pressed button state is drawn. This value is intended for instances where the button is used in a notification.

TraceCategoriesAndOptions

TraceConfig

An example TraceConfig that roughly matches what Chrome DevTools records:

Transaction (Type)

USBDevice (Type)

UploadData

UploadFile

UploadRawData

UserDefaultTypes

This type is a helper alias, no object will ever exist of this type.

WebPreferences (Type)

WebRequestFilter

WebSource

WindowOpenHandlerResponse

WindowSessionEndEvent

Unfortunately, Windows does not offer a way to differentiate between a shutdown and a reboot, meaning the 'shutdown' reason is triggered in both scenarios. For more details on the WM_ENDSESSION message and its associated reasons, refer to the MSDN documentation.

Type something to start searching.