Skip to main content

Module events

Module events 

Expand description

Clipboard events a host dispatches to the app.

A browser grants clipboard access only inside a trusted copy, cut or paste event, or inside the user’s click. The web runner wraps its dispatch of such an event in during (or of a click in during_input), and the web backend of system reads and writes through it. Nothing survives the event: a clipboard payload is never kept past the dispatch that received it.

The scopes compile and nest on every target, so a host’s dispatch code has no cfg; the desktop backends ignore them.

Enums§

CopyReport
How a copy made inside a click ended, reported to whoever dispatched it.

Traits§

EventTransfer
The data of one trusted clipboard event (the browser’s DataTransfer).

Functions§

copied
Whether the app wrote the clipboard event being dispatched. A host uses it to decide whether to suppress the browser’s default cut.
during
Run run while transfer is the clipboard event being dispatched. The event is read at most once and written at most once.
during_input
Run run while dispatching the user’s input event (a click on Copy). A copy made inside may publish through the browser’s own copy command; report hears how it ended.
in_event
Whether a clipboard event is being dispatched on this thread.