[html5] r4645 - [giow] (2) Make the drag-and-drop API lowercase all the format strings.
whatwg at whatwg.org
whatwg at whatwg.org
Wed Feb 3 18:29:09 PST 2010
Author: ianh
Date: 2010-02-03 18:29:07 -0800 (Wed, 03 Feb 2010)
New Revision: 4645
Modified:
complete.html
index
source
Log:
[giow] (2) Make the drag-and-drop API lowercase all the format strings.
Modified: complete.html
===================================================================
--- complete.html 2010-02-04 01:43:34 UTC (rev 4644)
+++ complete.html 2010-02-04 02:29:07 UTC (rev 4645)
@@ -61618,6 +61618,20 @@
Ack: Ben Laurie (@g)
+ * Promises. Should be able to say "if you accept this drop, then
+ I can provide the File object that corresponds to it
+ eventually".
+
+ * Exposing more information about each item. Best idea (from
+ Eduard Pascual) is to have a new attribute on dataTransfer
+ that's a list of items, each of which has:
+
+ .kind = text data, File data, promise
+ .type = a MIME type
+ .getData(callback) = calls the callback once the data is available
+ .setData(value) = replace the value
+ .remove() = removes the entry
+
-->
<p>This section defines an event-based drag-and-drop mechanism.</p>
@@ -61811,9 +61825,10 @@
<p><code><a href=#datatransfer>DataTransfer</a></code> objects can hold pieces of data, each
associated with a unique format. Formats are generally given by
<a href=#mime-type title="MIME type">MIME types</a>, with some values
- special-cased for legacy reasons. For the purposes of this API,
- however, the format strings are opaque, <a href=#case-sensitive>case-sensitive</a>,
- strings, and the empty string is a valid format string.</p>
+ special-cased for legacy reasons. However, the API does not enforce
+ this; non-MIME-type values can be added as well. All formats are
+ identified by strings that are <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a> by the API.</p>
<dl class=domintro><dt><var title="">dataTransfer</var> . <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> [ = <var title="">value</var> ]</dt>
@@ -61937,15 +61952,11 @@
<p>The <dfn id=dom-datatransfer-types title=dom-DataTransfer-types><code>types</code></dfn>
attribute must return a live <code>DOMStringList</code> that
contains the list of formats that were added to the
- <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. If any files were
+ <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. If any files were
included in the drag, then the <code>DOMStringList</code> object
- must in addition include the string "<code title="">Files</code>".</p>
+ must in addition include the string "<code title="">Files</code>". (This value can be distinguished from the
+ other values because it is not lowercase.)</p>
- <p class=note>If the <code title=dom-DataTransfer-setData><a href=#dom-datatransfer-setdata>setData()</a></code> method is invoked
- with the string "<code title="">Files</code>", and some files were
- included in the drag, then the string "<code title="">Files</code>"
- will appear twice in the <code title=dom-DataTransfer-types><a href=#dom-datatransfer-types>types</a></code> attribute's list.</p>
-
<p>The <dfn id=dom-datatransfer-cleardata title=dom-DataTransfer-clearData><code>clearData()</code></dfn>
method, when called with no arguments, must clear the
<code><a href=#datatransfer>DataTransfer</a></code> object of all data (for all formats).</p>
@@ -61958,28 +61969,32 @@
<p>When called with an argument, the <code title=dom-DataTransfer-clearData><a href=#dom-datatransfer-cleardata>clearData(<var title="">format</var>)</a></code> method must clear the
<code><a href=#datatransfer>DataTransfer</a></code> object of any data associated with the
- given <var title="">format</var>. If <var title="">format</var> is
- the value "<code title="">Text</code>", then it must be treated as
- "<code title="">text/plain</code>". If the <var title="">format</var> is "<code title="">URL</code>", then it must
- be treated as "<code title="">text/uri-list</code>".</p>
+ given <var title="">format</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. If <var title="">format</var> (after conversion to
+ lowercase) is the value "<code title="">text</code>", then it must
+ be treated as "<code title="">text/plain</code>". If the <var title="">format</var> (after conversion to lowercase) is "<code title="">url</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
<p>The <dfn id=dom-datatransfer-setdata title=dom-DataTransfer-setData><code>setData(<var title="">format</var>, <var title="">data</var>)</code></dfn> method
must add <var title="">data</var> to the data stored in the
- <code><a href=#datatransfer>DataTransfer</a></code> object, labeled as being of the type <var title="">format</var>. This must replace any previous data that had
- been set for that format. If <var title="">format</var> is the value
- "<code title="">Text</code>", then it must be treated as "<code title="">text/plain</code>". If the <var title="">format</var> is
- "<code title="">URL</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
+ <code><a href=#datatransfer>DataTransfer</a></code> object, labeled as being of the type <var title="">format</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. This must replace any previous data that had been
+ set for that format. If <var title="">format</var> (after conversion
+ to lowercase) is the value "<code title="">text</code>", then it
+ must be treated as "<code title="">text/plain</code>". If the <var title="">format</var> (after conversion to lowercase) is "<code title="">url</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
<p>The <dfn id=dom-datatransfer-getdata title=dom-DataTransfer-getData><code>getData(<var title="">format</var>)</code></dfn> method must return the data that
- is associated with the type <var title="">format</var>, if any, and
- must return the empty string otherwise. If <var title="">format</var> is the value "<code title="">Text</code>",
+ is associated with the type <var title="">format</var>
+ <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, if any, and must return
+ the empty string otherwise. If <var title="">format</var> (after
+ conversion to lowercase) is the value "<code title="">text</code>",
then it must be treated as "<code title="">text/plain</code>". If
- the <var title="">format</var> is "<code title="">URL</code>", then
- the data associated with the "<code title="">text/uri-list</code>"
- format must be parsed as appropriate for <code title="">text/uri-list</code> data, and the first URL from the list
- must be returned. If there is no data with that format, or if there
- is but it has no URLs, then the method must return the empty
- string. <a href=#refsRFC2483>[RFC2483]</a></p>
+ the <var title="">format</var> (after conversion to lowercase) is
+ "<code title="">url</code>", then the data associated with the
+ "<code title="">text/uri-list</code>" format must be parsed as
+ appropriate for <code title="">text/uri-list</code> data, and the
+ first URL from the list must be returned. If there is no data with
+ that format, or if there is but it has no URLs, then the method must
+ return the empty string. <a href=#refsRFC2483>[RFC2483]</a></p>
<p>The <dfn id=dom-datatransfer-files title=dom-DataTransfer-files><code>files</code></dfn>
attribute must return the <code>FileList</code> object that contains
@@ -61987,6 +62002,9 @@
object. There is one such object per <code><a href=#datatransfer>DataTransfer</a></code>
object.</p>
+ <p class=note>This version of the API does not expose the types of
+ the files during the drag.</p>
+
<p>The <dfn id=dom-datatransfer-setdragimage title=dom-DataTransfer-setDragImage><code>setDragImage(<var title="">element</var>, <var title="">x</var>, <var title="">y</var>)</code></dfn> method sets which element to use <a href=#base-dnd-feedback>to generate the drag feedback</a>. The
<var title="">element</var> argument can be any
<code>Element</code>; if it is an <code><a href=#the-img-element>img</a></code> element, then the
@@ -62689,6 +62707,10 @@
user agents must similarly use platform-specific conventions when
deciding on what drag feedback to use.</p>
+ <p>All the format strings must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. If the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label the dragged data, the
+ user agent must map the types to MIME types first.</p>
+
<p>If a drag is started in a document but ends in another
application, then the user agent must instead replace the parts of
the processing model relating to handling the <em>target</em>
Modified: index
===================================================================
--- index 2010-02-04 01:43:34 UTC (rev 4644)
+++ index 2010-02-04 02:29:07 UTC (rev 4645)
@@ -60821,6 +60821,20 @@
Ack: Ben Laurie (@g)
+ * Promises. Should be able to say "if you accept this drop, then
+ I can provide the File object that corresponds to it
+ eventually".
+
+ * Exposing more information about each item. Best idea (from
+ Eduard Pascual) is to have a new attribute on dataTransfer
+ that's a list of items, each of which has:
+
+ .kind = text data, File data, promise
+ .type = a MIME type
+ .getData(callback) = calls the callback once the data is available
+ .setData(value) = replace the value
+ .remove() = removes the entry
+
-->
<p>This section defines an event-based drag-and-drop mechanism.</p>
@@ -61014,9 +61028,10 @@
<p><code><a href=#datatransfer>DataTransfer</a></code> objects can hold pieces of data, each
associated with a unique format. Formats are generally given by
<a href=#mime-type title="MIME type">MIME types</a>, with some values
- special-cased for legacy reasons. For the purposes of this API,
- however, the format strings are opaque, <a href=#case-sensitive>case-sensitive</a>,
- strings, and the empty string is a valid format string.</p>
+ special-cased for legacy reasons. However, the API does not enforce
+ this; non-MIME-type values can be added as well. All formats are
+ identified by strings that are <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a> by the API.</p>
<dl class=domintro><dt><var title="">dataTransfer</var> . <code title=dom-DataTransfer-dropEffect><a href=#dom-datatransfer-dropeffect>dropEffect</a></code> [ = <var title="">value</var> ]</dt>
@@ -61140,15 +61155,11 @@
<p>The <dfn id=dom-datatransfer-types title=dom-DataTransfer-types><code>types</code></dfn>
attribute must return a live <code>DOMStringList</code> that
contains the list of formats that were added to the
- <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. If any files were
+ <code><a href=#datatransfer>DataTransfer</a></code> object in the corresponding <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event. If any files were
included in the drag, then the <code>DOMStringList</code> object
- must in addition include the string "<code title="">Files</code>".</p>
+ must in addition include the string "<code title="">Files</code>". (This value can be distinguished from the
+ other values because it is not lowercase.)</p>
- <p class=note>If the <code title=dom-DataTransfer-setData><a href=#dom-datatransfer-setdata>setData()</a></code> method is invoked
- with the string "<code title="">Files</code>", and some files were
- included in the drag, then the string "<code title="">Files</code>"
- will appear twice in the <code title=dom-DataTransfer-types><a href=#dom-datatransfer-types>types</a></code> attribute's list.</p>
-
<p>The <dfn id=dom-datatransfer-cleardata title=dom-DataTransfer-clearData><code>clearData()</code></dfn>
method, when called with no arguments, must clear the
<code><a href=#datatransfer>DataTransfer</a></code> object of all data (for all formats).</p>
@@ -61161,28 +61172,32 @@
<p>When called with an argument, the <code title=dom-DataTransfer-clearData><a href=#dom-datatransfer-cleardata>clearData(<var title="">format</var>)</a></code> method must clear the
<code><a href=#datatransfer>DataTransfer</a></code> object of any data associated with the
- given <var title="">format</var>. If <var title="">format</var> is
- the value "<code title="">Text</code>", then it must be treated as
- "<code title="">text/plain</code>". If the <var title="">format</var> is "<code title="">URL</code>", then it must
- be treated as "<code title="">text/uri-list</code>".</p>
+ given <var title="">format</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. If <var title="">format</var> (after conversion to
+ lowercase) is the value "<code title="">text</code>", then it must
+ be treated as "<code title="">text/plain</code>". If the <var title="">format</var> (after conversion to lowercase) is "<code title="">url</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
<p>The <dfn id=dom-datatransfer-setdata title=dom-DataTransfer-setData><code>setData(<var title="">format</var>, <var title="">data</var>)</code></dfn> method
must add <var title="">data</var> to the data stored in the
- <code><a href=#datatransfer>DataTransfer</a></code> object, labeled as being of the type <var title="">format</var>. This must replace any previous data that had
- been set for that format. If <var title="">format</var> is the value
- "<code title="">Text</code>", then it must be treated as "<code title="">text/plain</code>". If the <var title="">format</var> is
- "<code title="">URL</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
+ <code><a href=#datatransfer>DataTransfer</a></code> object, labeled as being of the type <var title="">format</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. This must replace any previous data that had been
+ set for that format. If <var title="">format</var> (after conversion
+ to lowercase) is the value "<code title="">text</code>", then it
+ must be treated as "<code title="">text/plain</code>". If the <var title="">format</var> (after conversion to lowercase) is "<code title="">url</code>", then it must be treated as "<code title="">text/uri-list</code>".</p>
<p>The <dfn id=dom-datatransfer-getdata title=dom-DataTransfer-getData><code>getData(<var title="">format</var>)</code></dfn> method must return the data that
- is associated with the type <var title="">format</var>, if any, and
- must return the empty string otherwise. If <var title="">format</var> is the value "<code title="">Text</code>",
+ is associated with the type <var title="">format</var>
+ <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>, if any, and must return
+ the empty string otherwise. If <var title="">format</var> (after
+ conversion to lowercase) is the value "<code title="">text</code>",
then it must be treated as "<code title="">text/plain</code>". If
- the <var title="">format</var> is "<code title="">URL</code>", then
- the data associated with the "<code title="">text/uri-list</code>"
- format must be parsed as appropriate for <code title="">text/uri-list</code> data, and the first URL from the list
- must be returned. If there is no data with that format, or if there
- is but it has no URLs, then the method must return the empty
- string. <a href=#refsRFC2483>[RFC2483]</a></p>
+ the <var title="">format</var> (after conversion to lowercase) is
+ "<code title="">url</code>", then the data associated with the
+ "<code title="">text/uri-list</code>" format must be parsed as
+ appropriate for <code title="">text/uri-list</code> data, and the
+ first URL from the list must be returned. If there is no data with
+ that format, or if there is but it has no URLs, then the method must
+ return the empty string. <a href=#refsRFC2483>[RFC2483]</a></p>
<p>The <dfn id=dom-datatransfer-files title=dom-DataTransfer-files><code>files</code></dfn>
attribute must return the <code>FileList</code> object that contains
@@ -61190,6 +61205,9 @@
object. There is one such object per <code><a href=#datatransfer>DataTransfer</a></code>
object.</p>
+ <p class=note>This version of the API does not expose the types of
+ the files during the drag.</p>
+
<p>The <dfn id=dom-datatransfer-setdragimage title=dom-DataTransfer-setDragImage><code>setDragImage(<var title="">element</var>, <var title="">x</var>, <var title="">y</var>)</code></dfn> method sets which element to use <a href=#base-dnd-feedback>to generate the drag feedback</a>. The
<var title="">element</var> argument can be any
<code>Element</code>; if it is an <code><a href=#the-img-element>img</a></code> element, then the
@@ -61892,6 +61910,10 @@
user agents must similarly use platform-specific conventions when
deciding on what drag feedback to use.</p>
+ <p>All the format strings must be <a href=#converted-to-ascii-lowercase>converted to ASCII
+ lowercase</a>. If the platform conventions do not use <a href=#mime-type title="MIME type">MIME types</a> to label the dragged data, the
+ user agent must map the types to MIME types first.</p>
+
<p>If a drag is started in a document but ends in another
application, then the user agent must instead replace the parts of
the processing model relating to handling the <em>target</em>
Modified: source
===================================================================
--- source 2010-02-04 01:43:34 UTC (rev 4644)
+++ source 2010-02-04 02:29:07 UTC (rev 4645)
@@ -70877,6 +70877,20 @@
Ack: Ben Laurie (@g)
+ * Promises. Should be able to say "if you accept this drop, then
+ I can provide the File object that corresponds to it
+ eventually".
+
+ * Exposing more information about each item. Best idea (from
+ Eduard Pascual) is to have a new attribute on dataTransfer
+ that's a list of items, each of which has:
+
+ .kind = text data, File data, promise
+ .type = a MIME type
+ .getData(callback) = calls the callback once the data is available
+ .setData(value) = replace the value
+ .remove() = removes the entry
+
-->
<p>This section defines an event-based drag-and-drop mechanism.</p>
@@ -71085,9 +71099,10 @@
<p><code>DataTransfer</code> objects can hold pieces of data, each
associated with a unique format. Formats are generally given by
<span title="MIME type">MIME types</span>, with some values
- special-cased for legacy reasons. For the purposes of this API,
- however, the format strings are opaque, <span>case-sensitive</span>,
- strings, and the empty string is a valid format string.</p>
+ special-cased for legacy reasons. However, the API does not enforce
+ this; non-MIME-type values can be added as well. All formats are
+ identified by strings that are <span>converted to ASCII
+ lowercase</span> by the API.</p>
<dl class="domintro">
@@ -71237,18 +71252,12 @@
attribute must return a live <code>DOMStringList</code> that
contains the list of formats that were added to the
<code>DataTransfer</code> object in the corresponding <code
- title="event-dragstart">dragstart</code> event. If any files were
+ title="event-dragstart">dragstart</code> event. If any files were
included in the drag, then the <code>DOMStringList</code> object
must in addition include the string "<code
- title="">Files</code>".</p>
+ title="">Files</code>". (This value can be distinguished from the
+ other values because it is not lowercase.)</p>
- <p class="note">If the <code
- title="dom-DataTransfer-setData">setData()</code> method is invoked
- with the string "<code title="">Files</code>", and some files were
- included in the drag, then the string "<code title="">Files</code>"
- will appear twice in the <code
- title="dom-DataTransfer-types">types</code> attribute's list.</p>
-
<p>The <dfn
title="dom-DataTransfer-clearData"><code>clearData()</code></dfn>
method, when called with no arguments, must clear the
@@ -71267,36 +71276,41 @@
title="dom-DataTransfer-clearData">clearData(<var
title="">format</var>)</code> method must clear the
<code>DataTransfer</code> object of any data associated with the
- given <var title="">format</var>. If <var title="">format</var> is
- the value "<code title="">Text</code>", then it must be treated as
- "<code title="">text/plain</code>". If the <var
- title="">format</var> is "<code title="">URL</code>", then it must
- be treated as "<code title="">text/uri-list</code>".</p>
+ given <var title="">format</var>, <span>converted to ASCII
+ lowercase</span>. If <var title="">format</var> (after conversion to
+ lowercase) is the value "<code title="">text</code>", then it must
+ be treated as "<code title="">text/plain</code>". If the <var
+ title="">format</var> (after conversion to lowercase) is "<code
+ title="">url</code>", then it must be treated as "<code
+ title="">text/uri-list</code>".</p>
<p>The <dfn title="dom-DataTransfer-setData"><code>setData(<var
title="">format</var>, <var title="">data</var>)</code></dfn> method
must add <var title="">data</var> to the data stored in the
<code>DataTransfer</code> object, labeled as being of the type <var
- title="">format</var>. This must replace any previous data that had
- been set for that format. If <var title="">format</var> is the value
- "<code title="">Text</code>", then it must be treated as "<code
- title="">text/plain</code>". If the <var title="">format</var> is
- "<code title="">URL</code>", then it must be treated as "<code
+ title="">format</var>, <span>converted to ASCII
+ lowercase</span>. This must replace any previous data that had been
+ set for that format. If <var title="">format</var> (after conversion
+ to lowercase) is the value "<code title="">text</code>", then it
+ must be treated as "<code title="">text/plain</code>". If the <var
+ title="">format</var> (after conversion to lowercase) is "<code
+ title="">url</code>", then it must be treated as "<code
title="">text/uri-list</code>".</p>
<p>The <dfn title="dom-DataTransfer-getData"><code>getData(<var
title="">format</var>)</code></dfn> method must return the data that
- is associated with the type <var title="">format</var>, if any, and
- must return the empty string otherwise. If <var
- title="">format</var> is the value "<code title="">Text</code>",
+ is associated with the type <var title="">format</var>
+ <span>converted to ASCII lowercase</span>, if any, and must return
+ the empty string otherwise. If <var title="">format</var> (after
+ conversion to lowercase) is the value "<code title="">text</code>",
then it must be treated as "<code title="">text/plain</code>". If
- the <var title="">format</var> is "<code title="">URL</code>", then
- the data associated with the "<code title="">text/uri-list</code>"
- format must be parsed as appropriate for <code
- title="">text/uri-list</code> data, and the first URL from the list
- must be returned. If there is no data with that format, or if there
- is but it has no URLs, then the method must return the empty
- string. <a href="#refsRFC2483">[RFC2483]</a></p>
+ the <var title="">format</var> (after conversion to lowercase) is
+ "<code title="">url</code>", then the data associated with the
+ "<code title="">text/uri-list</code>" format must be parsed as
+ appropriate for <code title="">text/uri-list</code> data, and the
+ first URL from the list must be returned. If there is no data with
+ that format, or if there is but it has no URLs, then the method must
+ return the empty string. <a href="#refsRFC2483">[RFC2483]</a></p>
<p>The <dfn title="dom-DataTransfer-files"><code>files</code></dfn>
attribute must return the <code>FileList</code> object that contains
@@ -71304,6 +71318,9 @@
object. There is one such object per <code>DataTransfer</code>
object.</p>
+ <p class="note">This version of the API does not expose the types of
+ the files during the drag.</p>
+
<p>The <dfn
title="dom-DataTransfer-setDragImage"><code>setDragImage(<var
title="">element</var>, <var title="">x</var>, <var
@@ -72224,6 +72241,11 @@
user agents must similarly use platform-specific conventions when
deciding on what drag feedback to use.</p>
+ <p>All the format strings must be <span>converted to ASCII
+ lowercase</span>. If the platform conventions do not use <span
+ title="MIME type">MIME types</span> to label the dragged data, the
+ user agent must map the types to MIME types first.</p>
+
<p>If a drag is started in a document but ends in another
application, then the user agent must instead replace the parts of
the processing model relating to handling the <em>target</em>
More information about the Commit-Watchers
mailing list