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

Re: Transforming DataTransfer.setData HTML content

From: Hallvord R. M. Steen <hsteen@mozilla.com>
Date: Mon, 3 Mar 2014 01:31:43 -0800 (PST)
To: Alexey Proskuryakov <ap@webkit.org>
Cc: WebApps WG <public-webapps@w3.org>
Message-ID: <1523783081.8477683.1393839103793.JavaMail.zimbra@mozilla.com>
> Safari, Firefox and Chrome all have different behavior when handling a call like 
> event.clipboardData.setData("text/html", "text"):

The clipboard event spec certainly doesn't handle this case. I had no idea some browsers had this quirky "convert-to-html" behaviour, and my first thought is that it looks sort of ugly and messy to do that..

On the other hand, I can imagine a sane-ish argument for, say, setData('text/html', 'foo & bar') actually placing 'foo &amp; bar' on the clipboard..? Also, the Windows CF_HTML format AFAIK requires wrapping the text in a bit of markup with some "magic" HTML comments.

Anyway, I'd say the implementation should leave the data it gets from JS as-is as much as possible. Unless that turns out to be incompatible with other applications, say word processors and such on the receiving end..

-Hallvord
Received on Monday, 3 March 2014 09:32:10 UTC

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