Skip to content
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 Pickling: should the unsanitized option support a way to ask for all representations to be unsanitized? #167

Open
BoCupp-Microsoft opened this issue Feb 2, 2022 · 4 comments

Comments

@BoCupp-Microsoft
Copy link
Contributor

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, however, you don't know what types you need to request until after you read.

Since the current proposal 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 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

@snianu
Copy link
Contributor

snianu commented Feb 4, 2022

@mbrodesser @annevk

@annevk
Copy link
Member

annevk commented Feb 7, 2022

I see where the ClipboardItem.prototype.types question in the other issue comes from now, I think. It would make sense to me if that lists all the types (lexicographically sorted) that the ClipboardItem contains. Otherwise you don't know what you can getType().

@snianu
Copy link
Contributor

snianu commented Feb 7, 2022

@annevk Agreed that ClipboardItem.prototype.types should list all the types(both custom & well known formas), but not sure about sorting lexicographically as there are platform specific requirements where the most desired format should be listed at the top. In this case, it would be custom formats at the top, well-known formats come after.

@annevk
Copy link
Member

annevk commented Feb 8, 2022

If platforms have a deterministic sorting order for built-in formats that works too, but presumably we need to say something for custom formats?

@EdgarChen EdgarChen mentioned this issue Sep 20, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants