Support files in clipboard. Files can currently be used with drag-and-drop, but not clipboard (cut, copy, paste). This proposes to expose files on the clipboard to renderers using a similar approach to drag-and drop. async function onPaste(e) { let file = e.clipboardData.files[0]; let contents = await file.text(); } This feature is already supported in safari for mac.
None
Contact emails
joelh...@chromium.orgExplainer
NoneSpecification
https://w3c.github.io/clipboard-apis/#clipboard-event-apiAPI spec
YesSummary
Support files in clipboard. Files can currently be used with drag-and-drop, but not clipboard (cut, copy, paste). This proposes to expose files on the clipboard to renderers using a similar approach to drag-and drop. async function onPaste(e) { let file = e.clipboardData.files[0]; let contents = await file.text(); } This feature is already supported in safari for mac.
Blink component
Blink>DataTransferTAG review
NoneTAG review status
Not applicableRisks
Interoperability and Compatibility
None
Gecko: No signal
WebKit: No signal
Tracking bug
http://crbug.com/1175483Launch bug
http://crbug.com/1174897Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5671807392677888This intent message was generated by Chrome Platform Status.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJJNyZaTGMZAfXmoge0CCOFBsoxObZBjGTjt6HXkft6cLtgZyQ%40mail.gmail.com.
Specification
https://w3c.github.io/clipboard-apis/#clipboard-event-apiAPI spec
YesSummary
Support files in clipboard. Files can currently be used with drag-and-drop, but not clipboard (cut, copy, paste). This proposes to expose files on the clipboard to renderers using a similar approach to drag-and drop. async function onPaste(e) { let file = e.clipboardData.files[0]; let contents = await file.text(); } This feature is already supported in safari for mac.
Blink component
Blink>DataTransferTAG review
NoneTAG review status
Not applicableRisks
Interoperability and Compatibility
None
Gecko: No signal
WebKit: No signal
Tracking bug
http://crbug.com/1175483Launch bug
http://crbug.com/1174897Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5671807392677888This intent message was generated by Chrome Platform Status.
--
Adding tests to web-platform-tests (WPT) would be nice, so that we can share these tests with other browser vendors.We can't really add automated WPT for this, because we're only implementing file read (and not file write), as I understand it, so there would be no way to place a file on the clipboard in an automated WPT.We certainly can make a manual test though, where the user must (1) download a file, (2) copy it in a OS file manager, (3) paste it on the test site. From there, the test could compare the actual pasted with the expected file info.For reference: Here's an example of a manual clipboard test, and here's an example of a manual (drag-and-drop) test with File interaction, and here's the clipboard WPT directory.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPV4WLbKSDL%3D0JUyJ4RRiYHGYnpvaSav_Yvc-kembxyKircepQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/ebb5ee9d-6b2e-43d3-9f9a-18b58e9d9eeen%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_VN6nVsi6QV8jVGaow1rAmRGNMGBYVBYMAYekC3vriug%40mail.gmail.com.