这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

ClipboardEvent() constructor returns a newly created ClipboardEvent , representing an event providing information related to modification of the clipboard, that is cut , copy ,和 paste 事件。

句法

var clipboardEvent = new ClipboardEvent(type[, options]);
					

参数

ClipboardEvent() constructor also inherits arguments from Event() .

type
DOMString representing the name of the type of the ClipboardEvent . It is case-sensitive and can be: 'copy' , 'cut' ,或 'paste' .
选项 可选
Options are as follows:
  • clipboardData : A DataTransfer containing the data concerned by the clipboard event.
  • dataType : A DOMString containing the MIME-type of the data contained in the data 自变量。
  • data : A DOMString containing the data concerned by the clipboard event.

规范

规范 状态 注释
Clipboard API and events
The definition of 'ClipboardEvent()' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
ClipboardEvent() 构造函数 Chrome 58 Edge ≤79 Firefox 22 IE ? Opera 45 Safari ? WebView Android 58 Chrome Android 58 Firefox Android 22 Opera Android 43 Safari iOS ? Samsung Internet Android 7.0

图例

完整支持

完整支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

另请参阅

元数据

  • 最后修改:
  1. ClipboardEvent
  2. 构造函数
    1. ClipboardEvent()
  3. 方法
    1. clipboardData
  4. 继承:
    1. 事件
  5. Related pages for Clipboard API
    1. Clipboard
    2. ClipboardItem
    3. Navigator.clipboard