<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 11/16/2010 4:05 PM, Daniel Cheng wrote:
<blockquote
cite="mid:AANLkTinGP=xTK=Npu9EcgXHjkdnGytFCM9O_5KaO5BAc@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Tue, Nov 16, 2010 at 14:48, Charles
Pritchard <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:chuck@jumis.com">chuck@jumis.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div class="im">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
When interacting with non-DOM apps or pages, some
platforms can't easily<br>
convert arbitrary MIME types to native data transfer
types for<br>
copy/paste or DnD. For this reason, I think the spec
should explicitly<br>
list MIME types for which UAs should handle the
conversion to native<br>
data transfer types. A couple that come to mind:
text/plain,<br>
text/uri-list, text/rtf, application/rtf, text/html,
text/xml,<br>
image/png, and image/svg+xml. UAs can make a best-effort
attempt to<br>
convert the other types, but it won't be guaranteed that
they will be<br>
there for interaction with non-DOM applications.<br>
</blockquote>
I'm not sure what this means exactly. Could you elaborate?<br>
</blockquote>
<br>
</div>
I don't think these need to be "converted" by a UA -- the
application which<br>
receives the data does that conversion on its own.<br>
<br>
This is a good use case for "promise"-based data callbacks.</blockquote>
<div><br>
</div>
<div>Automatic conversion is already implemented for some types
(text, URL, and maybe HTML). It's just not explicitly
mentioned in the spec. I'm not sure how a policy of no
conversion would work; the clipboard mechanism/encoding varies
greatly from platform to platform. With no automatic
conversion, a page trying to read text from a drop would have
to first sniff the operating system, choose the appropriate
strategy for reading text, and then transcode the result to a
DOMString.</div>
<div><br>
</div>
<div>Daniel</div>
</div>
</blockquote>
<br>
Sorry, I completely misunderstood this one. I thought you were
referring to operations from the browser to the desktop.<br>
<br>
The UA could handle conversion to image/png. It's low-hanging fruit.<br>
<br>
Conversion from complex formats into markup is something that should
be handled by the non-DOM app, not the UA.<br>
<br>
Lacking decent markup conversion, a FileList is fine. I don't have
to "sniff" the operating system,<br>
I just have to be determined on what mime types I'm going to
support.<br>
<br>
</body>
</html>