[w3c/clipboard-apis] Clipboard Pickling: should the unsanitized option support a way to ask for all representations to be unsanitized? (Issue #167)

Mostly authors are only interested in reading representations from the clipboard that they know how to ingest into their app.  For building a clipboard examiner app [like this](http://whsieh.github.io/examples/datatransfer), however, you don't know what types you need to request until after you read.

Since the [current proposal](https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md) requires the author to explicitly list every custom mime-type before they call read, it seems like a the clipboard examiner app won't be able to show  everything that could possibly be requested from the clipboard with the current proposal.

There was an [alternative considered](https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-pickling/explainer.md#alternative-considered-unsanitizedtrue) for `unsanitized:true`  in the explainer that said it would cause all representations to be read unsanitized.  That could solve the problem, but it would prevent the author from simultaneously requesting a sanitized copy of the well-known representations if they that's what they wanted.

Another option may be to move the unsanitized option to the `ClipboardItem.getType` call instead of the `Clipboard.read`.

@snianu 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/167
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/clipboard-apis/issues/167@github.com>

Received on Wednesday, 2 February 2022 01:06:53 UTC