[html5] r3583 - [] (0) Make files visible by making 'Files' a magic type in the .types array.

whatwg at whatwg.org whatwg at whatwg.org
Mon Aug 10 23:14:24 PDT 2009


Author: ianh
Date: 2009-08-10 23:14:23 -0700 (Mon, 10 Aug 2009)
New Revision: 3583

Modified:
   index
   source
Log:
[] (0) Make files visible by making 'Files' a magic type in the .types array.

Modified: index
===================================================================
--- index	2009-08-11 05:57:15 UTC (rev 3582)
+++ index	2009-08-11 06:14:23 UTC (rev 3583)
@@ -59829,7 +59829,9 @@
 
    <dd>
 
-    <p>Returns a <code>DOMStringList</code> of the formats available.</p>
+    <p>Returns a <code>DOMStringList</code> of the formats
+    available. If any files are being dragged, then one of the types
+    will be the string "<code title="">Files</code>".</p>
 
    </dd>
 
@@ -59923,12 +59925,28 @@
   <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 are stored in the
-  <code><a href=#datatransfer>DataTransfer</a></code> object.</p>
+  <code><a href=#datatransfer>DataTransfer</a></code> object. If any files are stored in the
+  <code><a href=#datatransfer>DataTransfer</a></code> object, then the
+  <code>DOMStringList</code> object must in addition include the
+  string "<code title="">Files</code>".</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 are
+  stored in the <code><a href=#datatransfer>DataTransfer</a></code> object, 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>
 
+  <p class=note>The <code title=dom-DataTransfer-clearData><a href=#dom-datatransfer-cleardata>clearData()</a></code> method does
+  not affect whether any files are stored in the
+  <code><a href=#datatransfer>DataTransfer</a></code> object, so the <code title=dom-DataTransfer-types><a href=#dom-datatransfer-types>types</a></code> attribute's list might
+  still not be empty after calling <code title=dom-DataTransfer-clearData><a href=#dom-datatransfer-cleardata>clearData()</a></code> (it would
+  still contain the "<code title="">Files</code>" string if there are
+  any files in the object).</p>
+
   <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

Modified: source
===================================================================
--- source	2009-08-11 05:57:15 UTC (rev 3582)
+++ source	2009-08-11 06:14:23 UTC (rev 3583)
@@ -65546,7 +65546,9 @@
 
    <dd>
 
-    <p>Returns a <code>DOMStringList</code> of the formats available.</p>
+    <p>Returns a <code>DOMStringList</code> of the formats
+    available. If any files are being dragged, then one of the types
+    will be the string "<code title="">Files</code>".</p>
 
    </dd>
 
@@ -65651,13 +65653,34 @@
   <p>The <dfn title="dom-DataTransfer-types"><code>types</code></dfn>
   attribute must return a live <code>DOMStringList</code> that
   contains the list of formats that are stored in the
-  <code>DataTransfer</code> object.</p>
+  <code>DataTransfer</code> object. If any files are stored in the
+  <code>DataTransfer</code> object, then the
+  <code>DOMStringList</code> object must in addition include the
+  string "<code title="">Files</code>".</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 are
+  stored in the <code>DataTransfer</code> object, 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
   <code>DataTransfer</code> object of all data (for all formats).</p>
 
+  <p class="note">The <code
+  title="dom-DataTransfer-clearData">clearData()</code> method does
+  not affect whether any files are stored in the
+  <code>DataTransfer</code> object, so the <code
+  title="dom-DataTransfer-types">types</code> attribute's list might
+  still not be empty after calling <code
+  title="dom-DataTransfer-clearData">clearData()</code> (it would
+  still contain the "<code title="">Files</code>" string if there are
+  any files in the object).</p>
+
   <p>When called with an argument, the <code
   title="dom-DataTransfer-clearData">clearData(<var
   title="">format</var>)</code> method must clear the




More information about the Commit-Watchers mailing list