Js_of_ocaml.ClipboardClipboard API.
A code example:
if Clipboard.is_supported ()
then
ignore
(Promise.map
(fun () -> Console.console##log (Js.string "copied"))
((Clipboard.clipboard ())##writeText (Js.string "Hello!")))class type clipboardItem = object ... endval clipboardItem : (Js.Unsafe.any -> clipboardItem Js.t) Js.constrnew%js clipboardItem data builds a clipboard item. data is a plain JavaScript object whose keys are MIME types and whose values are the associated File.blob, string, or a promise resolving to either.
val item_supports : Js.js_string Js.t -> bool Js.titem_supports mime reports whether the given MIME type is supported by the clipboard. Bound to the static ClipboardItem.supports method.
class type clipboard = object ... end