<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
On 12/1/2010 2:52 PM, Daniel Cheng wrote:
<blockquote
cite="mid:AANLkTimi7_73dWV8bPMZOjJa-6f7p8ra4EsUFafVcX6-@mail.gmail.com"
type="cite"><font face="arial,helvetica,sans-serif">Couple of
things I noticed after the changes to the DnD spec:</font>
<div>
<div><font class="Apple-style-span" face="arial, helvetica,
sans-serif">- event.dataTransfer.types no longer mentions
"Text" or "URL". Is this intentional?</font></div>
</div>
</blockquote>
They're covered in implementation:<br>
<a class="moz-txt-link-freetext" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#datatransfer">http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#datatransfer</a><br>
If format equals "text", change it to "text/plain".<br>
If format equals "url", change it to "text/uri-list".<br>
Let format be the first argument, converted to ASCII lowercase<br>
<blockquote
cite="mid:AANLkTimi7_73dWV8bPMZOjJa-6f7p8ra4EsUFafVcX6-@mail.gmail.com"
type="cite">
<div>
<div><font class="Apple-style-span" face="arial, helvetica,
sans-serif">- Does the casing of "Text" and "URL" in the
return value of event.dataTransfer.types matter?</font></div>
</div>
</blockquote>
It shouldn't, they are converted to lowercase.<br>
<br>
<blockquote
cite="mid:AANLkTimi7_73dWV8bPMZOjJa-6f7p8ra4EsUFafVcX6-@mail.gmail.com"
type="cite">
<div>
<div><font class="Apple-style-span" face="arial, helvetica,
sans-serif"><br>
</font></div>
<div><font class="Apple-style-span" face="arial, helvetica,
sans-serif">Daniel<br>
</font>
<div><br>
<div class="gmail_quote">On Wed, Nov 17, 2010 at 13:05,
Charles Pritchard <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:chuck@jumis.com">chuck@jumis.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
<div class="im"> On 11/16/2010 4:05 PM, Daniel Cheng
wrote: </div>
<blockquote type="cite">
<div class="gmail_quote">
<div class="im">On Tue, Nov 16, 2010 at 14:48,
Charles Pritchard <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:chuck@jumis.com"
target="_blank">chuck@jumis.com</a>></span>
wrote: </div>
<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">
<div>
<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>
</div>
<div class="im"> This is a good use case for
"promise"-based data callbacks.</div>
</blockquote>
<div class="im">
<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>
</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>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>