-
Notifications
You must be signed in to change notification settings - Fork 37
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
Spec readiness and compat #135
Comments
I am going to start landing the code for I also added some new WPT that Chrome is probably going to fail: web-platform-tests/wpt#27311 |
Hmm yeah, it is unfortunate that this isn't completely specified. My understanding is that the specification had quite a few properties (including
My understanding of
This is quite unfortunate. The clipboard specification does specify Mandatory Data Types for Thanks for pointing these out, and I agree that it'd be nice if the specification were more clear on these things. cc @garykac |
Thanks for adding some tests here, @evilpie! Looking at https://wpt.fyi/results/clipboard-apis/async-navigator-clipboard-basics.https.html?run_id=5753596027076608&run_id=5764703215157248&run_id=5740072676622336 it looks like some subtests are failing in all browsers, notably "navigator.clipboard.write({string : DOMString}) succeeds". Are those tests correct per spec, or is the spec not specific enough? Another ping for @garykac :) |
The test passes in Firefox when the correct prefs are set. I haven't tested Webkit. Chrome is wrong, because they only implement support for |
I see, so the test is failing for different reasons. @garykac do you know if there's an open bug for what @evilpie is pointing out? I found https://bugs.chromium.org/p/chromium/issues/detail?id=487266 but don't think that's it. |
I didn't find an open bug, but I did file a new one here to cover using DOMString in Chromium. |
We discussed this in the EditingTF meeting and there were few concerns raised in the meeting that we should probably address first before standardizing any formats in the Async clipboard APIs. Tagging @whsieh @dway123 @gked @BoCupp-Microsoft @johanneswilm to chime in if I missed anything.
|
I'd support mentioning in the spec that we require sanitization to strip out privacy-sensitive information or content that could attack native decoders. Mandatory data types defined in the spec currently are all platform-neutral. We could add support for platform-specific types, but this may be difficult for web developers to work with (they may require platform-dependent code, which was discouraged in previous discussions). |
I started working on an implementation of
ClipboardItem
andclipboard.write
using that in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1619947I don't think the current spec can be implemented without either reverse-engineering other browsers or just guessing.
ClipboardItem
is missing descriptions of all its methods and properties. Some behavior can not just be inferred by name.createDelayed
? It's not implemented by ChromeDOMString
inClipboardItemDataType
. The rest of the spec only seems to handleBlob
. (See also What does ClipboardItem.getType do #119)Blob
notDOMString
types
property. Safari seems to supportpresentationStyle
as well.ClipboardItemData
in Chrome.clipboard.write
Blob
and the corresponding DOMString MIME type inClipboardItem
must matchSorry I can't easily test Safari, but looking at their IDL definition they also only implement a subset of this spec.
The text was updated successfully, but these errors were encountered: