Closed 16amattice closed 1 month ago
This PR adds the ability to interact with the client's clipboard in the Rio framework. Specifically, it introduces two new methods:
set_clipboard
get_clipboard
Clipboard operations enhance user experience by allowing easy copying and pasting of text programmatically.
on_press
self.session.set_clipboard
self.session.get_clipboard
None
Great work! Just one thing: According to MDN, navigator.clipboard is only available in certain situations. Could you add a ClipboardError that's raised when the browser doesn't support navigator.clipboard?
navigator.clipboard
ClipboardError
What does it do?
This PR adds the ability to interact with the client's clipboard in the Rio framework. Specifically, it introduces two new methods:
set_clipboard
to set the clipboard textget_clipboard
to retrieve the current clipboard textWhy is it needed?
Clipboard operations enhance user experience by allowing easy copying and pasting of text programmatically.
How to test it?
on_press
events.self.session.set_clipboard
andself.session.get_clipboard
in these event handlers.Related issue(s)/PR(s)
None