Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Clipboard.read()

3 tags 1 category

The read() method of the Clipboard interface requests a copy of the clipboard’s contents, fulfilling the returned Promise with the data.

The method can in theory return arbitrary data (unlike readText(), which can only return text). Browsers commonly support reading text, HTML, and PNG image data.

Inputs: formats An optional object with the following properties: unsanitized An Array of strings containing MIME types of data formats that should not be sanitized when reading from the clipboard.

Inputs: Certain browsers may sanitize the clipboard data when it is read, to prevent malicious content from being pasted into the document. For example, Chrome (and other Chromium-based browsers) sanitizes HTML data by stripping <script> tags and other potentially dangerous content. Use the unsanitized array to specify a list of MIME types that should not be sanitized.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…