Skip to content

Instantly share code, notes, and snippets.

@benkolera
Created January 23, 2019 03:18
Show Gist options
  • Save benkolera/fb8c922b786461c2039b7caabbf1e630 to your computer and use it in GitHub Desktop.
Save benkolera/fb8c922b786461c2039b7caabbf1e630 to your computer and use it in GitHub Desktop.
Copy to clipboard
copyToClipboard elt doc = do
JsHtmlElement.focus elt
JsInput.select elt
JsDocument.execCommand_ doc ("copy"::String) False (Nothing::Maybe String)
pure ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment