ClipboardEvent

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

ClipboardEvent 接口描述了与修改剪切板相关信息的事件,这些事件包括 剪切cut , 复制copy 和 粘贴paste 事件。

构造函数

ClipboardEvent()

用给定的参数创建了一个 ClipboardEvent 事件。

属性

同样是从其父类 Event 继承的属性。

ClipboardEvent.clipboardData 只读

是一个 DataTransfer 对象,它包含了由用户发起的 cutcopypaste 操作影响的数据,以及它的 MIME 类型。

方法

没有特定方法;从父类 Event 继承方法。

规范

Specification
Clipboard API and events
# clipboard-event-interfaces

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ClipboardEvent
ClipboardEvent() constructor
clipboardData

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见