[add] Clipboard API

Close #125
Fix #122
This commit is contained in:
Nicolas Gallagher
2016-12-16 11:39:28 +00:00
parent 92a2cb274a
commit 695eba45af
5 changed files with 73 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# Clipboard
Clipboard gives you an interface for setting to the clipboard. (Getting
clipboard content is not supported on web.)
## Methods
static **getString**()
Returns a `Promise` of an empty string.
static **setString**(content: string): boolean
Copies a string to the clipboard. On web, some browsers may not support copying
to the clipboard, therefore, this function returns a boolean to indicate if the
copy was successful.