<font face="arial,helvetica,sans-serif">Couple of things I noticed after the changes to the DnD spec:</font><div><div><font face="arial,helvetica,sans-serif"></font><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><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><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 href="mailto:chuck@jumis.com">chuck@jumis.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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 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>