Re: [clipboard-apis] Non Recognizable formats (#9)

What happens "under the hood" here is basically: 

* The UA has a registry mapping the supported native clipboard types to the MIME types used for the clipboard API. For example, on Windows one of the entries is probably 'text/html' -> 'CF_HTML'
* When registerClipboardFormat() is called, for each MIME type (key) in the dictionary, it will check with the OS if the native clipboard knows about each format description on the list.
* The first matching format description (if any) will be added to the mapping table

On reading from the clipboard, all data with the descriptions given in our mapping table will be exposed to JS with the corresponding MIME type.

On writing to the clipboard, all data with a MIME type listed in the mapping table will be placed on the clipboard with the corresponding native description.

Right?

I'm not sure if implementors are happy about this. There's some pushback against allowing web contents to write binary data to the clipboard for security reasons - if you have vulnerabilities in local software (which is of course a *when*, not an *if*) an attacker can trick you into pasting some exploit payload into the vulnerable software.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/clipboard-apis/issues/9#issuecomment-123829662

Received on Wednesday, 22 July 2015 19:08:35 UTC