anso...@microsoft.com, sni...@microsoft.com, sa...@microsoft.com
https://w3c.github.io/clipboard-apis
Delays the generation of the clipboard payload until it is needed by the target applications. Delayed clipboard rendering leverages the existing Async Clipboard API to allow web applications to improve performance when exchanging large data payloads by only producing the clipboard payload once a target application attempt to access it.
Source applications typically don’t know where the user intends to paste the content at the time of copy, so web applications may produce several formats when writing to the clipboard to prepare for many possible target applications. The generation of one or more representations may take enough time that it is noticeable to the user, but it is unlikely that the target application will need all produced representations.
https://github.com/w3c/editing/issues/417
Pending
Chromium is the first browser to support delayed clipboard rendering. Firefox and Safari have expressed no concerns about the concept.
Gecko: No signal (https://github.com/w3c/editing/issues/417#issuecomment-1452770119) Expressed
no concerns.
WebKit: No signal (https://github.com/w3c/editing/issues/417#issuecomment-1452770119) Expressed
no concerns.
Web developers: No signals
Other signals:
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
The Async Clipboard API have tooling support as described in the DevTools support checklist.
No
TBD
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1408850
No milestones specified
https://chromestatus.com/feature/5124936324087808
This intent message was generated by Chrome Platform Status.
Performance improvement. No change in Web APIs.
Not applicable
Chromium is the first browser to support delayed clipboard rendering. Firefox and Safari have expressed no concerns about the concept.
Gecko: Neutral (https://github.com/mozilla/standards-positions/issues/758) Expressed no concerns,
conversation: https://github.com/w3c/editing/issues/417#issuecomment-1452770119
WebKit: Positive (https://github.com/WebKit/standards-positions/issues/144) Expressed no concerns,
conversation: https://github.com/w3c/editing/issues/417#issuecomment-1452770119
Web developers: Positive Our partners have shown interest to leverage delayed clipboard rendering along with the Clipboard Async API's custom formats.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
--
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/DM5PR00MB0328BDEAEA01D55DFB967AD0FDB39%40DM5PR00MB0328.namprd00.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAD649j6Cz4fUEbAK%3DRJ7to0PJ0Qp72OcSw-Au_vQZdRTS%2BC6%2Bw%40mail.gmail.com.
Thank you for the comments!
const promiseBlob = new Promise(generateExpensiveHTML);
function generateExpensiveHTML(resolve, reject) {
const blobInput = new Blob([ '<p>Some HTML</p>'], {type: 'text/html'});
resolve(blobInput);
}
or
const promiseBlob = new Promise((resolve, reject) => {
const blobInput = new Blob([ '<p>Some HTML</p>'], {type: 'text/plain'});
resolve(blobInput);
});
const clipboardItem = new ClipboardItem({'text/html': promiseBlob});
await navigator.clipboard.write([clipboardItem]);
The following examples would need a change in the API in order to work.
1.
const promiseBlob = new Promise(generateExpensiveHTML);
const clipboardItem = new ClipboardItem({'text/html': promiseBlob});
await navigator.clipboard.write([clipboardItem]);
function generateExpensiveHTML(resolve, reject) {
const blobInput = new Blob([ '<p>Some HTML</p>'], {type: 'text/html'});
return blobInput;
}
2.
const clipboardItem = new ClipboardItem({'text/html': generateExpensiveHTML});
await navigator.clipboard.write([clipboardItem]);
Thanks,
Ana
From: Sangwhan Moon <s...@chromium.org>
Sent: Sunday, March 5, 2023 11:27 AM
To: Joshua Bell <jsb...@chromium.org>; Ana Sollano Kim <Ana.S...@microsoft.com>
Cc: blin...@chromium.org; Anupam Snigdha <sni...@microsoft.com>; Sanket Joshi (EDGE) <sa...@microsoft.com>; est...@chromium.org; etien...@chromium.org; asu...@chromium.org; dch...@chromium.org; a...@chromium.org
Subject: [EXTERNAL] Re: [blink-dev] RE: Intent to Prototype: Delayed clipboard rendering
You don't often get email from s...@chromium.org. Learn why this is important |
On Mar 7, 2023, at 8:21, Ana Sollano Kim <Ana.S...@microsoft.com> wrote:
Thank you for the response. We’ll act accordingly regarding the TAG review.
Further clarifications on the highlighted examples. I included these just to show what currently does NOT work with the current API, but we’re not actively pursuing that and it is out of scope for this proposal.
Thanks,
Ana
From: Sangwhan Moon <s...@chromium.org>
Sent: Monday, March 6, 2023 3:47 PM
To: Ana Sollano Kim <Ana.S...@microsoft.com>
Cc: Joshua Bell <jsb...@chromium.org>; blin...@chromium.org; Anupam Snigdha <sni...@microsoft.com>; Sanket Joshi (EDGE) <sa...@microsoft.com>; est...@chromium.org; etien...@chromium.org; asu...@chromium.org; dch...@chromium.org; a...@chromium.org
Subject: Re: [EXTERNAL] Re: [blink-dev] RE: Intent to Prototype: Delayed clipboard rendering
You don't often get email from s...@chromium.org. Learn why this is important |
If the API surface doesn't change, it's probably fine to skip the TAG review. That said, I'll skim the proposal and let you know if there is a need.
On Mar 7, 2023, at 8:21, Ana Sollano Kim <Ana.S...@microsoft.com> wrote:
Thank you for the comments!
- I changed the explainer to reflect the current state of that document. The one I linked is the current one.
- I updated the permissions of the design doc to allow for suggestions/comments. Feedback is very much appreciated in the google doc. We can also discuss via email or call as needed. We have an issue opened in the EWG, so that's also a good place for feedback on the explainer.
- I updated the examples on the design doc with a couple of nits. Regarding the ClipboardItem constructor: when the promise to the function resolves into a Blob, the existing Async Clipboard API just works. Examples:
const promiseBlob = new Promise(generateExpensiveHTML);
function generateExpensiveHTML(resolve, reject) {
const blobInput = new Blob([ '<p>Some HTML</p>'], {type: 'text/html'});
resolve(blobInput);
}
or
const promiseBlob = new Promise((resolve, reject) => {
const blobInput = new Blob([ '<p>Some HTML</p>'], {type: 'text/html}); // fixed typo
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/SN6PR00MB0336529FE93A9CA81FA246BFFDB79%40SN6PR00MB0336.namprd00.prod.outlook.com.
Thank you for the feedback here and in the linked design document. It was a miss on our part that the function passed to the promise constructor - ie. the executor - cannot be used for delayed rendering because it is run immediately upon promise creation. As a result, we will need an API update to support delayed clipboard rendering. We’re getting feedback on how the update to web API can look like to allow delayed clipboard rendering, discussion around that can be found in the issue filed in the editing repo: Seeking feedback on delayed clipboard rendering proposal · Issue #417 · w3c/editing · GitHub. We’ll report back when we have an agreement on this.
Thanks,
Ana
From: PhistucK <phis...@gmail.com>
Sent: Tuesday, March 7, 2023 2:49 AM
To: Ana Sollano Kim <Ana.S...@microsoft.com>
Cc: Sangwhan Moon <s...@chromium.org>; Joshua Bell <jsb...@chromium.org>; blin...@chromium.org; Anupam Snigdha <sni...@microsoft.com>; Sanket Joshi (EDGE) <sa...@microsoft.com>; est...@chromium.org; etien...@chromium.org; asu...@chromium.org; dch...@chromium.org;
a...@chromium.org
Subject: Re: [EXTERNAL] Re: [blink-dev] RE: Intent to Prototype: Delayed clipboard rendering
You don't often get email from phis...@gmail.com. Learn why this is important |