Contact emails
Spec
Editor's Draft Clipboard Spec: https://w3c.github.io/clipboard-apis/
Explainer: https://github.com/garykac/clipboard/blob/master/clipboard.md
Summary
Ship the plain-text portion of the new async clipboard API that is based on Promises as an initial step to shipping improved clipboard access. As part of this we will implement/ship Clipboard Permissions that will initially only be used for this new API.
The API for text support (clipboard.readText() and clipboard.writeText()) has been stable (behind a flag) for many months. We are not requesting to ship the general API (clipboard.read() and clipboard.write()) since it is likely to undergo changes in the near future.
There are 2 permissions that control access to this API: "clipboard-read" and "clipboard-write" (see Clipboard Permission)
All clipboard access is gated behind:
"clipboard-write" access is auto-granted (given the above constraints) while read access will require the user to grant "clipboard-read" permission for the site.
Note that this Intent to Ship does *not* cover changing the existing clipboard APIs (event- or execCommand-based) to make use of the new Permission. That will be a separate Intent to Implement/Ship since there is more risk due to the UX changes.
If you have a recent local/Dev/Canary build, you can use the API at https://permission.site.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Interoperability and Compatibility Risk
Low.
This intent is to add a new async API without changing the current clipboard API, so no existing content will break. Existing clipboard APIs will not (yet) be changed to use the new clipboard Permission.
General response from other browser vendors (Apple, Mozilla, Microsoft) has been positive and it was generally agreed that this API should move forward. See discussion at https://www.w3.org/2016/09/22-webapps-minutes.html#item17 and in the github repo.
Further discussion to resolve outstanding issues (images, mimetypes, delayed content generation) is ongoing.
Note that proper web platform support for clipboard cut/copy/paste has been a longstanding request from users and web developers. See related bugs: 424968, 443355, 593475 (and also 150835, 390583, mozilla/1356543, which cover images and/or rich text).
Link to "Intent to Implement"
https://groups.google.com/a/chromium.org/forum/#!topic/Blink-dev/pFI8AMdDChM
Link to web-platform-tests
https://github.com/w3c/web-platform-tests/tree/master/clipboard-apis
https://wpt.fyi/clipboard-apis (feature is currently behind a flag, some tests are manual since they require a permission and access the shared system clipboard)
Also:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/clipboard/
Launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5861289330999296
Requesting approval to ship?
Yes for the plain text APIs, but not for the general or image-specific APIs:
Yes for the Clipboard Permission, but only as it applies to the new API (not to existing clipboard APIs).
Are you perhaps using an older template? I don't see a W3C TAG review listed.
I also don't think it's accurate to claim Mozilla has taken a position on this API.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnkXoHj0RV_jovoWgecBNnfTdyRfr%3D%3DawkmuUKx4jT3LxP_UA%40mail.gmail.com.
LGTM1This looks great, and I see issues filed by at least Gecko and WebKit engineers on https://github.com/w3c/clipboard-apis/issues, so I would expect any strong disagreement with the model to have surfaced by now.None of the open issues seem to mention "readText" or "writeText", so that's good. (Except one I just filed, not blocking.)Out of the tests in https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/clipboard/, could all of those be put in web-platform-tests if there were a way to set permissions? +Jonathon Kereliuk is working on that, so maybe this is a good candidate to try it with? (Many APIs using permissions also have some other part that's tricky to automate.)
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnkXoFA0oJj70tU%2BaQ0CMFPAd3Kj5axLUMuTpLiF%2BCdgjyyKA%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
While that's in flight, I have a few questions about the API:
- Why is `readText()` not a flag on `read()`? E.g., `read({ types: ["text/plain", ...] })`
- `readText()` doesn't appear in the Explainer. How should a developer choose between them when they're both available?
- Will there always be text content?
- Is `clipboardchange` modeled using the same permission as reading?
- I see coverage of the Permissions API integration in the spec (great!). Would be great to see examples of how to use this API in the Explainer. Specifically, it seems that the ClipboardPermissionDescriptor would naturally be the same option bag that one would pass to read()/write() (or perhaps I'm missing something there?)
As a nit, might be good to have links from the Explainer to the spec and vise versa. Also, it'd be great if the explainer lived in the same repo.
Regarding interop risk, are other browsers implementing this?
|
The discussion around that moved to the Privacy Review bug: https://bugs.chromium.org/p/chromium/issues/detail?id=772426#c23The decision was that:(1) The Async Clipboard Write API would be allowed as long as (a) Chrome was the foreground app, and (b) the request is from the currently active tab(2) The Async Clipboard Read API has the same requirements as the Write API, but it also requires explicit Permission to be grantedThere is no need for a user gesture in either case.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnkXoEcSyozsf_XhurZ0gSFC-pFF2UCCggy1oqqiVE6HLSe2g%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnkXoEjj2YeeLSh47aDq7H-46h_hEUiiqWbOXE-BxLBzOKSTQ%40mail.gmail.com.
Hey Gary,Apologies for not responding to this thread sooner. Thanks for updating the explainer. It's much easier to see what's going on with the intended use of the API now.I continue to have a few concerns:
- Do you anticipate the set of read*/write* methods growing in the future (e.g., for JSON, images, etc.)?
- No image formats beyond SVG are supported in writing. This is a security precaution? If so, I can understand why this might be perhaps reasonable on legacy OSes, but is it required of all OSes? Also, surely, SVG is the most complex image format...how is that safe when the others aren't?
- Is the set of readable formats knowable synchronously? If so, should there be an introspection API for this that can guard read*() methods?
- The style of reading multiple different types asynchronously is pretty far from what you'd get with, e.g., a Response object. For the sake of consistency, you might imagine `.text()`, `.json()`, etc. methods. Maybe this doesn't make sense because it isn't deserializing a single stream (as in, it isn't a single consumable source of data fronted by many methods, but rather many values hosted on a single object), but the naming at least feels out of step.
- The example in 7.2.2 shows `read()`, not `readText()`
--
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+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGnkXoEiA4BPcX2A9zfy9w-1kfTgJZzNgMAEOmPyhM6KRP7OZg%40mail.gmail.com.
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/CAGnkXoEiA4BPcX2A9zfy9w-1kfTgJZzNgMAEOmPyhM6KRP7OZg%40mail.gmail.com.
--
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/CAOMQ%2Bw-7CVAccqu0p3mCxq-x94NwORv3Rt9njZC-f74O4sR6mA%40mail.gmail.com.
--
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/c3a1f016-1c32-4bba-8ec4-c747ed9ca526%40chromium.org.