W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

[clipboard API] platform integration stuff - in spec or out of scope?

From: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
Date: Sat, 31 Jan 2015 14:48:37 +0100
Message-ID: <CAE3JC2x0V0B6mFuNwCpnLjonzJ40F4P8OULQBt2xbh3cUeb7Ug@mail.gmail.com>
To: WebApps WG <public-webapps@w3.org>
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?


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:


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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:43 UTC