HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
565210712[Gecko] [Internet Explorer] [Opera] [Webkit] dropzone 4/5, part, um, 3/2: some bits I somehow missed in the previous checkin. Oops.2010-10-29 22:57
@@ -75138,20 +75138,26 @@ interface <dfn>NavigatorAbilities</dfn> {
      <dd>
 
       <p>A Unicode string giving the type or format of the data,
       generally given by a <span>MIME type</span>. Some values that
       are not <span title="MIME type">MIME types</span> are
       special-cased for legacy reasons. The API does not enforce the
       use of <span title="MIME type">MIME types</span>; other values
       can be used as well. In all cases, however, the values are all
       <span>converted to ASCII lowercase</span> by the API.</p>
 
+      <p class="note">Strings that contain <span title="space
+      character">space characters</span> cannot be used with the <code
+      title="attr-dropzone">dropzone</code> attribute, so authors are
+      encouraged to use only <span title="MIME type">MIME types</span>
+      or custom strings (without spaces).</p>
+
      </dd>
 
      <dt>The actual data</dt>
 
      <dd><p>A Unicode or binary string, optionally with a file name
      (itself a Unicode string), <!-- (DND-v4:) or an object, --> as per
      <span>the drag data item kind</span>.</p></dd>
 
     </dl>
 
@@ -75821,20 +75827,94 @@ DND-v5:  <span>DataTransferItem</span> <span title="dom-DataTransferItems-add">a
   must run the following steps:</p>
 
   <ol>
 
    <li><p>If the <code>DataTransferItems</code> object is not in the
    <i title="concept-dnd-rw">read/write mode</i>, return null and
    abort these steps.</p></li>
 
    <li>
 
+    <p>Jump to the appropriate set of steps from the following list:</p>
+
+    <dl class="switch">
+
+     <dt>If the first argument to the method is a string</dt>
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list</span>
+      whose <span title="the drag data item kind">kind</span> is
+      <i>Plain Unicode string</i>, whose <span title="the drag data
+      item type string">type string</span> is equal to the value of
+      the method's second argument, <span>converted to ASCII
+      lowercase</span>, and whose data is the string given by the
+      method's first argument.</p>
+
+     </dd>
+
+<!--DND-v3:
+     <dt>If the first argument to the method is a <code>Blob</code></dt>
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list</span>
+      whose <span title="the drag data item kind">kind</span> is
+      <i>Blob</i>, whose <span title="the drag data item type
+      string">type string</span> is the <code
+      title="dom-Blob-type">type</code> of the <code>Blob</code>,
+      <span>converted to ASCII lowercase</span>, and whose data is the
+      same as the <code>Blob</code>'s data.</p>
+
+     </dd>
+-->
+
+     <dt>If the first argument to the method is a <code>File</code></dt>
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list</span>
+      whose <span title="the drag data item kind">kind</span> is
+      <i>File</i>, whose <span title="the drag data item type
+      string">type string</span> is the <code
+      title="dom-Blob-type">type</code> of the <code>File</code>,
+      <span>converted to ASCII lowercase</span>, and whose data is the
+      same as the <code>File</code>'s data.</p>
+
+     </dd>
+
+<!--DND-v4:
+     <dt>Otherwise
+
+     <dd>
+
+      <p>Add an item to the <span>drag data store item list</span>
+      whose <span title="the drag data item kind">kind</span> is
+      <i>Object</i>, whose <span title="the drag data item type
+      string">type string</span> is equal to the value of the method's
+      second argument, <span>converted to ASCII lowercase</span>, and
+      whose data is a <span>structured clone</span> of the method's
+      first argument. If creating the clone throws an exception, then
+      throw that exception and abort these steps.</p>
+
+     </dd>
+-->
+
+    </dl>
+
+   </li>
+
+   <li><p><span title="dom-DataTransferItems-item">Determine the value
+   of the indexed property</span> corresponding to the newly added
+   item, and return that value (a newly created
+   <code>DataTransferItem</code> object).</p></li>
+
   </ol>
 
   </div>
 
 
   <h5>The <code>DataTransferItem</code> interface</h5>
 
   <p>Each <code>DataTransferItem</code> object is associated with a
   <code>DataTransfer</code> object.</p>
 
@@ -76689,26 +76769,28 @@ interface <dfn>FunctionObjectCallback</dfn> {
          <dt>If the <span>current target element</span> is a text
          field (e.g. <code>textarea</code>, or an <code>input</code>
          element whose <code title="attr-input-type">type</code>
          attribute is in the <span
          title="attr-input-type-text">Text</span> state) or an
          <span>editable</span> element</dt>
 
          <dd><p>Set the <span>current target element</span> to the
          <span>immediate user selection</span> anyway.</p></dd>
 
+
          <dt>If the <span>current target element</span> is
          <span>the body element</span></dt>
 
          <dd><p>Leave the <span>current target element</span>
          unchanged.</p></dd>
 
+
          <dt>Otherwise</dt>
 
          <dd>
 
           <p><span>Fire a DND event</span> named <code
           title="event-dragenter">dragenter</code> at <span>the body
           element</span>, and set the <span>current target
           element</span> to <span>the body element</span>, regardless
           of whether that event was canceled or not.</p>
 

|