use web/clip
Dependencies: web/permissions
This module hooks into the Clipboard API which allows Phoo to put stuff on and read from the user’s clipboard.
clip.can-copy?
( → t
)Returns true, false, or undefined depending on whether the user has granted, denied, or dismissed the permission prompt for writing to the clipboard.
clip.can-read?
( → t
)Returns true, false, or undefined depending on whether the user has granted, denied, or dismissed the permission prompt for reading the clipboard.
clip.share
( → s
)Reads the text currently contained on the user’s clipboard.
clip.put
( s
→ )Puts a string onto the user’s clipboard, equivalent to them selecting it and hitting copy.
docs@04547c7