Header menu logo fable-electron-docs-api

Dock Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ❌

Instance members

Instance member Description

this.bounce ?type

Full Usage: this.bounce ?type

Parameters:
Returns: int
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

an ID representing the request.When critical is passed, the dock icon will bounce until either the application becomes active or the request is canceled.When informational is passed, the dock icon will bounce for one second. However, the request remains active until either the application becomes active or the request is canceled.> [!NOTE] This method can only be used while the app is not focused; when the app is focused it will return -1.

?type : Type
Returns: int

this.cancelBounce id

Full Usage: this.cancelBounce id

Parameters:
    id : int

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Cancel the bounce of id.

id : int

this.downloadFinished filePath

Full Usage: this.downloadFinished filePath

Parameters:
    filePath : string

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Bounces the Downloads stack if the filePath is inside the Downloads folder.

filePath : string

this.getBadge ()

Full Usage: this.getBadge ()

Returns: string
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

The badge string of the dock.

Returns: string

this.getMenu ()

Full Usage: this.getMenu ()

Returns: Option<Menu>
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

The application's dock menu.

Returns: Option<Menu>

this.hide ()

Full Usage: this.hide ()

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Hides the dock icon.

this.isVisible ()

Full Usage: this.isVisible ()

Returns: bool
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Whether the dock icon is visible.

Returns: bool

this.setBadge text

Full Usage: this.setBadge text

Parameters:
    text : string

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Sets the string to be displayed in the dock’s badging area.> [!IMPORTANT] You need to ensure that your application has the permission to display notifications for this method to work.

text : string

this.setIcon image

Full Usage: this.setIcon image

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Sets the image associated with this dock icon.

image : U2<NativeImage, string>

this.setMenu menu

Full Usage: this.setMenu menu

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Sets the application's dock menu.

menu : Menu

this.show ()

Full Usage: this.show ()

Returns: Promise<unit>
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Resolves when the dock icon is shown.

Returns: Promise<unit>

Type something to start searching.