write method
The write()
method of the Clipboard interface writes arbitrary
data to the clipboard, such as images, fulfilling the returned Promise
on completion.
This can be used to implement cut and copy functionality.
The method can in theory write arbitrary data (unlike Clipboard.writeText, which can only write text). Browsers commonly support writing text, HTML, and PNG image data — see browser compatibility for more information.
Implementation
external JSPromise<JSAny?> write(ClipboardItems data);