-
Notifications
You must be signed in to change notification settings - Fork 2k
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
FF122 Clipboard async API in preview/late beta #21667
Conversation
This comment was marked as spam.
This comment was marked as spam.
…ard.clipboardItem items
316df88
to
64b2998
Compare
I'm still waiting on confirmations on whether there are additional off-spec restrictions, but I think this is correct. |
@queengooborg @Elchi3 Any chance I could get some advice on this - not nagging - just aware I am away for a couple of weeks after Tuesday. If you can't do it, then no worries. |
EDITED. Spec says
---Chromium--- This went in in 107 https://chromium.googlesource.com/chromium/src/+/10300ac7da93a7e322274f1e
Also requires Permission-Policy from 85 https://chromestatus.com/feature/5767075295395840 There's a new API for reading unsanitised data https://chromestatus.com/feature/5716132676763648 in 122. It is Chrome only, and likely to remain Chrome only. --- Firefox ---
The Firefox security considerations for Web Extensions are slightly different:
|
"chrome": { | ||
"version_added": "66", | ||
"partial_implementation": true, | ||
"notes": [ | ||
"From version 86, the <code>text/html</code> MIME type is supported.", | ||
"From version 85, Requires Permission-Policy <code>clipboard-read</code> permission.", | ||
"From version 76, the <code>image/png</code> MIME type is supported.", | ||
"From version 66, the <code>text/plain</code> MIME type is supported.", | ||
"Requires Permission API <code>clipboard-read</code> permission. Does not require transient activation." | ||
] | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, given that these are all partial implementations, combining the notes like this makes them much easier to use (this is what was done in the other methods). We could consider adding a subfeature for the supported MIME types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit unclear why Chrome is marked partial_implementation when other browsers have similar (amounts of) notes and aren't marked partial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "Does not require transient activation." is the thing that Chrome should have in order to be not-partial?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Elchi3 TBH I did not modify partial and did not really think about it. TLDR; - my take is that probably should make this no longer partial - do you want me to take care of it?
I suspect that this was partial originally waiting on From version 85, Requires Permission-Policy clipboard-read permission.",
. The spec now no longer requires clipboard-read
so you could argue it should always have been full implementation. Either way we never remove "full implementation" due to later changes, so it should be full now.
The whole thing is messy because all the other browsers are using transient activation and never intend to implement permissions. The spec has PRs against it to change it this way, but they are unlikely to be accepted without consensus with Chrome. So you might argue that the other browsers are partial implementations against the current spec. I think that just complicates things so we'd best just make them all full.
If you need a more detailed explanation might be best to have a call with me or WillB who have worked through it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TLDR; - my take is that probably should make this no longer partial - do you want me to take care of it?
yeah, I think we should treat everyone the same at least. Thanks for dealing with the messy compat story here.
Updated to reflect the information gathered in #21667 (comment). It omits the new subfeatures discussed in https://chromestatus.com/feature/5716132676763648. I'll probably do those in a follow on. |
…o ff122_clipboard_async
…ee/browser-compat-data into ff122_clipboard_async
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to merge this. It seems like an overall improvement and we can follow-up with more if needed.
This status for read() and readText() isn't clearly explained by the notes, but seems to have been carried forward when merging compat statements in mdn#21667. Since the required formats are now supported, it doesn't make sense to continue to claim partial implementation. mdn#7991 would make this clearer still.
FF122 enables the
dom.events.asyncClipboard.clipboardItem
anddom.events.asyncClipboard.readText
on preview (@IS_EARLY_BETA_OR_EARLIER@
) in https://bugzilla.mozilla.org/show_bug.cgi?id=1809106This updates the corresponding
Clipboard
andClipboardItem
interfaces to be inpreview
, deleting some of the older versions.Note that it is in draft while I confirm some behaviours: https://bugzilla.mozilla.org/show_bug.cgi?id=1809106#c14
Related docs work can be tracked in mdn/content#31104