-
Notifications
You must be signed in to change notification settings - Fork 56
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 #901
Comments
@cynthia Just checking if TAG got a chance to review this proposal? If there is a similar pattern elsewhere (like supported image formats for drawImage etc) that this API could benefit from, then we could also think about using a similar design pattern in the clipboard API as well. Note that we do have consensus from all major browser vendors & EditingWG for this API. |
Hi, since the clipboard is a pretty privacy sensitive part of the Web Platform, a majority of the TAG feels that any API touching the clipboard needs a Security & Privacy self-review. Would you mind filling that in? Thanks! |
I found a similar API canPlayType for media element that informs the user about the supported MIME types. So, it looks like there is some precedent for this kind of design. |
Hi there, We looked at this today in a breakout during our London F2F. We overall think the feature is a good addition to the web platform and a low hanging fruit for improving DX. One concern that came up is that Btw we had a lot of trouble reviewing this feature because the explainer was a GitHub issue, and the only way to see what was actually proposed was to read the spec. It wou;d be helpful for both us and others to have an explainer, even if brief. |
@LeaVerou Thank you for reviewing this feature! Apologies for not writing an explainer. Chromestatus entry for this feature has a brief explanation of this proposal and a demo page to show how it would be used by web authors, but an explainer with this info would have been better. Since we already shipped this API in Blink and I think Safari and Firefox are also planning to implement this API soon, I'm not sure if we can change the API at this point. However, I agree that perhaps adding an overloaded |
To clarify, while I wrote the comment, reviewing is a collaborative effort.
Typically if an API has not shipped in other browsers yet, it can absolutely be changed, at least in terms of web compat. Especially if it’s about to ship in other browsers, that makes any changes pretty urgent — soon after it ships across the board, it's too late to make changes. Also, the purpose of design reviews is to get feedback on a variety of aspects, including API design. if you're not in a position to change the API, why is this review open? TAG resources are very limited and time spent on a review is time not spent on another review, so please be considerate of this in the future.
Our concern wasn't that |
Note that this review was opened in September 2023 and we waited couple of months for feedback. Just for my understanding, in the future, should we close the issue if we ship it in one or more browsers? Is there a specific tag that I need to be aware of in the issue that indicates that it is in-review and we should wait for feedback? I'll consult with other stakeholders to see if we can make a change to add a dictionary argument instead of passing the MIME type as I personally think that it makes it more readable, so thank you for that feedback! FWIW, there was some precedent for passing the MIME type in a method that has similar functionality, so we followed that design pattern. |
I have opened an issue in the Clipboard API repo for feedback from the EditingWG. Please post any concerns in that issue so we can discuss with all the stakeholders. Thanks! |
I disagree with this feedback. HTML uses |
@annevk
There is no such tag because reviews happen quite fast, most of the (unfortunately long) wait time is review requests waiting in the queue. You can however follow the milestones, which indicate when we plan to get to it. |
Thanks for taking our feedback on board, the rationale for your API design makes sense. |
こんにちは TAG-さん!
I'm requesting a TAG review of Feature detection for supported clipboard formats.
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.
Further details:
You should also know that...
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
We'd prefer the TAG provide feedback as (please delete all but the desired option):
☂️ open a single issue in our GitHub repo for the entire review
The text was updated successfully, but these errors were encountered: