Skip to content

ElectronTray.on('drop-files') method

ElectronTray › on(‘drop-files’)

Unofficial

Registers a listener that is invoked when dragged files are dropped in the tray icon. darwin only.

Signature:

on(event: "drop-files", listener: (event: ElectronEvent, files: string[]) => void): this

Parameters:

Parameter Type Description
event "drop-files" The event name.
listener (event: ElectronEvent, files: string[]) => void The event handler receiving the event and the paths of the dropped files.

Returns: thisThis tray instance.