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

Report unsupported data types that were on the clipboard? #129

Open
lgarron opened this issue Jun 26, 2020 · 1 comment
Open

Report unsupported data types that were on the clipboard? #129

lgarron opened this issue Jun 26, 2020 · 1 comment

Comments

@lgarron
Copy link
Contributor

lgarron commented Jun 26, 2020

As browsers roll out implementation, websites will find themselves in a situation where they may want the user to paste certain data types (e.g. a specific image format). At the moment, there is no way to distinguish the following:

  • The browser doesn't support the format for reading.
  • The clipboard didn't contain the format.

If we provide an API for the website to check if a read type is supported, this would allow them to distinguish. However, we could make it easier for sites to detect this situation and/or provide error messages if they can tell whether there was a format on the clipboard that was not available to paste. ("It seems you tried to paste JPEG, but your browser only supports PNG right now.")

If reporting on arbitrary formats is not a great idea, then it could be restricted to the formats in the API.

I don't actually think this is a great idea, but I thought I'd file it as an alternative to #67.

@jimmywarting
Copy link

I found the list to be fairly limited also... want to support more than just images.
how about something more custom like vnd? application/vnd.xxxxxx that is specific to your own application?

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

2 participants