docs.rodeo

MDN Web Docs mirror

Clipboard

{{APIRef("Clipboard API")}} {{SecureContext_Header}} 

The Clipboard interface of the Clipboard API provides read and write access to the contents of the system clipboard. This allows a web application to implement cut, copy, and paste features.

{{InheritanceDiagram}} 

The system clipboard is exposed through the global {{domxref("Navigator.clipboard")}}  property.

All of the Clipboard API methods operate asynchronously; they return a {{jsxref("Promise")}}  which is resolved once the clipboard access has been completed. The promise is rejected if clipboard access is denied.

All the methods require a secure context. Additional requirements for using the API are discussed in the Security consideration section of the API overview topic.

Instance methods

Clipboard is based on the {{domxref("EventTarget")}}  interface, and includes its methods.

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN