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 #259

Open
snianu opened this issue Sep 20, 2023 · 2 comments
Open

Feature detection for supported clipboard formats #259

snianu opened this issue Sep 20, 2023 · 2 comments

Comments

@snianu
Copy link

snianu commented Sep 20, 2023

WebKittens

@annevk @whsieh

Title of the spec

Feature detection for supported clipboard formats

URL to the spec

https://w3c.github.io/clipboard-apis/#clipboard-item-interface, https://w3c.github.io/clipboard-apis/#dom-clipboarditem-supports

URL to the spec's repository

https://w3c.github.io/clipboard-apis/#clipboard-item-interface, https://w3c.github.io/clipboard-apis/#dom-clipboarditem-supports

Issue Tracker URL

w3c/clipboard-apis#170

Explainer URL

w3c/clipboard-apis#170

TAG Design Review URL

w3ctag/design-reviews#901

Mozilla standards-positions issue URL

mozilla/standards-positions#889

WebKit Bugzilla URL

No response

Radar URL

No response

Description

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.

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

@marcoscaceres
Copy link
Contributor

Discussed this internally with colleagues and, unless anyone objects within a week, we are inclined to label this as "support".

@annevk
Copy link
Contributor

annevk commented Nov 23, 2023

It's not clear how this algorithm ends up working for optional data types. I filed w3c/clipboard-apis#200 on that.

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