This proposes to expose read-only files on the clipboard to renderers using a similar approach to drag-and drop. Renderers will have access to read file paths from the clipboard, but not write paths to the clipboard. For file paths on the clipboard, renderers will have read-only access. async function onPaste(e) { let file = e.clipboardData.files[0]; let contents = await file.text(); }


Chrome supports files via DataTransfer for drag and drop, but not for clipboard. It is useful for users to be able to use clipboard keyboard shortcuts such as Ctrl+C, Ctrl+V for a task such as attaching a file to an email rather than only drag and drop.



Editor's draft

Status in Chromium


In developer trial (Behind a flag) (tracking bug) in:

  • Chrome for desktop release 90

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.


Last updated on 2021-02-23