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

Feature detection for supported clipboard formats #889

Closed
snianu opened this issue Sep 20, 2023 · 3 comments
Closed

Feature detection for supported clipboard formats #889

snianu opened this issue Sep 20, 2023 · 3 comments
Labels
position: positive ready to add Appears ready to add to the table of positions.

Comments

@snianu
Copy link

snianu commented Sep 20, 2023

Request for Mozilla Position on an Emerging Web Specification

Other information

Note that this was discussed in the EditingWG meeting and was approved by representatives from Webkit, FF & Chromium: https://www.w3.org/2022/04/14-editing-minutes.html#r01

Positive signal from Gecko: w3c/clipboard-apis#170 (comment)
Web developers: Strongly positive (w3c/clipboard-apis#165 (comment)) Multiple Github issues were filed for this feature: w3c/clipboard-apis#165 (comment) w3c/clipboard-apis#67 (comment) w3c/clipboard-apis#170

Summary

Currently during async clipboard write operation, there is no way for the web authors to detect if a particular mime type is supported by the UAs or not before attempting to actually write the formats to the clipboard. This not only affects developer ergonomics as now web authors have to attempt to write to the clipboard first in order to find out whether write failed due to a particular mime type not supported by the UAs (or sometimes add version checks that are unreliable at best), but also leads to unnecessary cost in terms of CPU cycles, COGS etc in order to produce an expensive web custom format which may not be supported by a particular browser.

@EdgarChen
Copy link

I think it is a reasonable API we should support as currently there is no good way to determine if a specific format is supported by the browser.

@zcorpan zcorpan added ready to add Appears ready to add to the table of positions. position: positive labels Oct 9, 2023
@zcorpan
Copy link
Member

zcorpan commented Oct 9, 2023

@EdgarChen does this need an entry on the dashboard?

@EdgarChen
Copy link

EdgarChen commented Oct 9, 2023

This is a small and simple API, I think this could be considered as an improvement of async clipboard API, so don't needs an entry on the dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
position: positive ready to add Appears ready to add to the table of positions.
Projects
None yet
Development

No branches or pull requests

4 participants