-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clipboard API #143
Comments
Could we split out the async clipboard APIs and other clipboard APIs into different proposals? Making a proposal for async clipbaord was part of the outcome of the 2022 editing investigation (web-platform-tests/interop-2022-editing#7), so I think that likely has a greater level of support compared to changes to the non-async clipbaord API. If you want to propose both, I'm happy to do the work to file a seperate proposal for async clipboard. Otherwise we could modify this proposal to just drop the non-async parts. |
In this proposal I was referring to the modern clipboard API ( |
Some observations on the tests:
|
@jgraham to make it explicit, there's no splitting required here, right? |
This feels like it deserves its own proposal and I'd be happy to submit one. But absent that, I will chime in here with a note of support: We (Adobe) are very keen on seeing support for web custom formats across browsers. This is an important API that would greatly improve copy-paste workflows for any web application that makes use of custom formats (drawing tools, word processors, photo editors, etc.) Though native SVG support would also be nice, it seems to be sanitized to the point of uselessness (at least in Chromium), whereas web custom formats offers a suitable workaround to this issue. |
In WebKit (and Gecko, AFAIK) many of these web platform tests in Additionally, the permissions API is unimplemented in WebDriver in WebKit; even when running the tests in
So it appears that in order for these tests to pass in WebKit, we would need to:
|
To be clear, we consider the priority of https://wpt.fyi/results/clipboard-apis/async-write-svg-read-svg.https.html?label=experimental&label=master&aligned https://wpt.fyi/results/clipboard-apis/async-svg-script-removal.https.html?label=experimental&label=master&aligned https://wpt.fyi/results/clipboard-apis/async-custom-formats-write-read.tentative.https.html?label=experimental&label=master&aligned to be different in scope/priority to the other work in this proposal, and we'd like to see it split into a different proposal. |
For the record, I'm happy for the interop team to do whatever they wish with this proposal, including splitting it or addressing any subset of the proposal at their discretion. |
From that WPT issue:
So there's probably quite a lot of test work involved here, if we have agreement about what the permission or gesture or whatever should be? |
There's some discussion about the user gesture requirements in w3c/clipboard-apis#182. |
In the MDN short survey on APIs & JavaScript, "Clipboard API ( |
I sent a PR to use bless() instead: There are a bunch of tests that rely on "clipboard-read" that should be changed or removed: The permissions policy tests are also out of date. I send an initial PR for that, but someone will need to take that over: |
Thank you for proposing the Clipboard API for inclusion in Interop 2023. We wanted to let you know that this proposal was not selected to be part of Interop this year. As detailed in the issue comments, tests for this proposal rely on automation APIs not available across all three browsers. Resubmitting a proposal when tests have been updated as part of a future round of Interop would be welcome. For an overview of our process, see the proposal selection summary. Thank you again for contributing to Interop 2023! Posted on behalf of the Interop team. |
Description
Modern clipboard APIs have been around for a while, so we don't need to rely on things like
document.execCommand('copy')
any more. However support is still patchy and inconsistent across browsers, meaning fallbacks are still sometimes required.Rationale
Using the clipboard is a very common task for web developers - e.g. this StackOverflow question "How do I copy to the clipboard in JavaScript?" has over 4000 votes.
However reading from the clipboard is still not supported in Firefox (readText() is only supported in extensions, not web content). Browsers have different rules about when access is allowed (see #142). Support for binary formats and certain MIME types appears to be mixed (e.g. is HTML allowed? AVIF images? SVG? is metadata preserved? etc), and there's newer support for "Web Custom Formats". Overall it's all a mixed bag. It would be good if this was a robustly interoperable part of the web platform.
Specification
https://www.w3.org/TR/clipboard-apis/
Tests
https://wpt.fyi/results/clipboard-apis
The text was updated successfully, but these errors were encountered: