Skip to content

ElectronTray.on('drop-text') method

ElectronTray › on(‘drop-text’)

Unofficial

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

Signature:

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

Parameters:

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

Returns: thisThis tray instance.