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§
- Copy
Report - How a copy made inside a click ended, reported to whoever dispatched it.
Traits§
- Event
Transfer - 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
runwhiletransferis the clipboard event being dispatched. The event is read at most once and written at most once. - during_
input - Run
runwhile dispatching the user’s input event (a click on Copy). A copy made inside may publish through the browser’s own copy command;reporthears how it ended. - in_
event - Whether a clipboard event is being dispatched on this thread.