Re: [w3ctag/design-reviews] TAG review: Async Clipboard - image/delayed content (#350)

### Re: Drag and Drop

There isn't any real shared infrastructure other than the need for a dictionary of { mimetype -> data }. Beyond that, the two APIs are very different and touch different parts of the UA implementation.

* Clipboard: access system clipboard + related permission and security issues (re: decoding malicious content) + dict(mimetype->data)

* DnD: lots of UI events relating to the dragging + permission/security(?) + dict(mimetype->data)

Note that any permission/security issues for DnD (to address malicious content) will be different than for Clipboard (since there is a guaranteed user gesture, but can't easily show a prompt).

### Re: DataTransfer

`DataTransfer` is only used by the Clipboard Event API to get the aforementioned dictionary of { mimetype -> data }. Beyond that it contains a collection of DnD-specific attributes (`dropEffect`, `effectAllowed`, `dragImage`) that are not useful for Clipboard.

Our approach is to have a `ClipboardItem` type that contains a standard dictionary. This allows the clipboard data to be created more easily (esp. when compared to a series of `DataTransferItemList.add()` calls).

I've updated the explainer with a section about `DataTransfer`.

### Re: Pickling

The pickling conversation was in the context of making custom mimetypes and raw (non-transcoded) image data available on the native clipboard. We intend to document this format, but that is out-of-scope for this current phase.

### Sanitization/transcoding

We want to leave the exact details of the transcoding up to the UA, but I need to make that explicit in the spec. Thanks for pointing that out.
 
### Re: "do away with current API"

The only clipboard API that actually uses the DataTransfer object is the Event-based API, and no changes are being made to that. The Async Clipboard API has never used DataTransfer (although we did try to make it work), so we're not removing any functional API.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/350#issuecomment-474111653

Received on Monday, 18 March 2019 21:38:24 UTC