- From: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
- Date: Sat, 31 Jan 2015 14:48:37 +0100
- To: WebApps WG <public-webapps@w3.org>
- Message-ID: <CAE3JC2x0V0B6mFuNwCpnLjonzJ40F4P8OULQBt2xbh3cUeb7Ug@mail.gmail.com>
Hi, so I think the Clipboard API spec is shaping up nicely - but here's the question: what's the most important stuff that's lacking, if anything? http://dev.w3.org/2006/webapi/clipops/clipops.html One area in particular that the spec sort of skips around, is platform integration. For example, it says all implementations must support reading and writing text/html content - but what, specifically, does that mean for the various platform clipboard implementations? For example, on Windows, IE has a specific HTML clipboard format where it constructs a full (and AFAIK valid) HTML document, then inserts specific StartFragment and EndFragment HTML comments to mark the beginning/end of the selection, along with some extra meta data that also helps describe the start/end of the content that was actually selected for copying: https://msdn.microsoft.com/en-us/library/windows/desktop/ms649015%28v=vs.85%29.aspx To do what the user expects, "supporting" HTML format pasting on Windows therefore requires parsing the data on the clipboard to pull out the meta data and/or special comments, and only put the stuff between StartFragment and EndFragment in the DataTransfer object. Does the spec need to document such platform implementation details? If yes, do any of the other "mandatory" types have gotchas like Windows "HTML Format" - on any platform? The mandatory types currently are: - text/plain - text/uri-list - text/csv - text/css - text/html - application/xhtml+xml - image/png - image/jpg, image/jpeg - image/gif - image/svg+xml - application/xml, text/xml - application/javascript - application/json - application/octet-stream I don't know what these "map to" on platforms that do not use MIME types to describe clipboard contents. Should this information be dug up and included? -Hallvord R
Received on Saturday, 31 January 2015 13:49:06 UTC