Permalink
Browse files

[e] (0) dropzone 1/5: the new model

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10712

git-svn-id: http://svn.whatwg.org/webapps@5646 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 74d3e5e commit 1928d48df2e248596303b69aab0e01cb9e668d42 @Hixie Hixie committed Oct 25, 2010
Showing with 282 additions and 69 deletions.
  1. +89 −24 complete.html
  2. +89 −24 index
  3. +104 −21 source
View
113 complete.html
@@ -214,7 +214,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>Web Applications 1.0</h1>
- <h2 class="no-num no-toc">Draft Standard &mdash; 23 October 2010</h2>
+ <h2 class="no-num no-toc">Draft Standard &mdash; 25 October 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -65978,35 +65978,90 @@ <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.7.2 </span>
void <a href=#dom-datatransfer-addelement title=dom-DataTransfer-addElement>addElement</a>(in Element element);
};</pre>
- <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. 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>
+ <p><code><a href=#datatransfer>DataTransfer</a></code> objects are used to expose the data
+ that underlies a drag-and-drop operation.</p>
-<!--
+ <p>The data that underlies a drag-and-drop operation, known as the
+ <dfn id=drag-data-store>drag data store</dfn>, consists of an unordered list of items
+ representing the dragged data, and some information used to generate
+ the UI feedback during the drag.</p>
-XXX
+ <p>Each item representing dragged data in a <a href=#drag-data-store>drag data
+ store</a> has the following information:</p>
-here we say what the DataTransfer objects model is, and that it can be in a read/write mode, secret mode, read-only mode
+ <ul><li>
-model is:
- - list of items (see DataTransferItem above)
- - the drag image (search for "drag feedback"):
- - elements
- - bitmap, x, y
+ <p>The type or format of the data, generally given by a <a href=#mime-type>MIME
+ type</a>. Some values that are not <a href=#mime-type title="MIME type">MIME
+ types</a> are special-cased for legacy reasons. The API does
+ not enforce the use of <a href=#mime-type title="MIME type">MIME types</a>;
+ other values can be used as well. In all cases, however, the
+ values are all <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a> by the
+ API.</p>
-plan:
- 1. describe model
- 2. replace the existing API definitions with links to this model
- 3. expose model with new API
- 4. add dropzone="..." feature
+ </li>
--->
+ <li>
+
+ <p>The kind of data:</p>
+
+ <dl><dt>Plain Unicode string</dt>
+ <dd>
+ <p>Raw text.</p>
+ </dd>
+
+ <dt>Blob</dt>
+ <dd>
+ <p>Binary data.</p>
+ </dd>
+
+ <dt>File</dt>
+ <dd>
+ <p>Binary data with a file name.</p>
+ </dd>
+
+ </dl></li>
+
+ </ul><p>The information in a <a href=#drag-data-store>drag data store</a> used to
+ generate the UI feedback during the drag consists of:</p>
+
+ <ul><li>A list of zero or more elements.</li>
+
+ <li>Optionally, a bitmap image and the coordinate of a point within
+ that image.</li>
+
+ </ul><p>A <a href=#drag-data-store>drag data store</a> is created at the start of a
+ drag-and-drop operation in the <i>read/write mode</i>, and then
+ progresses through the following three modes as the operation
+ proceeds:</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>
+ <dl><dt>Read/write mode</dt>
+ <dd>
+
+ <p>At the start of the drag. New data can be added to the
+ <a href=#drag-data-store>drag data store</a>.</p>
+
+ </dd>
+
+ <dt>Protected mode</dt>
+ <dd>
+
+ <p>During the drag. The formats and kinds in the <a href=#drag-data-store>drag data
+ store</a> list of items representing dragged data can be
+ enumerated, but the data itself is unavailable and no new data can
+ be added.</p>
+
+ </dd>
+
+ <dt>Read-only mode</dt>
+ <dd>
+
+ <p>After the drop. The list of items representing dragged data can
+ be read, including the data. No new data can be added.</p>
+
+ </dd>
+
+ </dl><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>
<dd>
@@ -66093,7 +66148,17 @@ <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>8.7.2 </span>
</dd>
- </dl><div class=impl>
+ </dl><!--
+
+XXX
+
+plan:
+ 2. replace the existing API definitions with links to this model
+ 3. make it clear there's a new DataTransfer object with each event
+ 4. expose model with new API
+ 5. add dropzone="..." feature
+
+--><div class=impl>
<p>When a <code><a href=#datatransfer>DataTransfer</a></code> object is created, it must be
initialized as follows:</p>
View
113 index
@@ -218,7 +218,7 @@
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
- <h2 class="no-num no-toc">Draft Standard &mdash; 23 October 2010</h2>
+ <h2 class="no-num no-toc">Draft Standard &mdash; 25 October 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -65984,35 +65984,90 @@ interface <dfn id=navigatorabilities>NavigatorAbilities</dfn> {
void <a href=#dom-datatransfer-addelement title=dom-DataTransfer-addElement>addElement</a>(in Element element);
};</pre>
- <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. 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>
+ <p><code><a href=#datatransfer>DataTransfer</a></code> objects are used to expose the data
+ that underlies a drag-and-drop operation.</p>
-<!--
+ <p>The data that underlies a drag-and-drop operation, known as the
+ <dfn id=drag-data-store>drag data store</dfn>, consists of an unordered list of items
+ representing the dragged data, and some information used to generate
+ the UI feedback during the drag.</p>
-XXX
+ <p>Each item representing dragged data in a <a href=#drag-data-store>drag data
+ store</a> has the following information:</p>
-here we say what the DataTransfer objects model is, and that it can be in a read/write mode, secret mode, read-only mode
+ <ul><li>
-model is:
- - list of items (see DataTransferItem above)
- - the drag image (search for "drag feedback"):
- - elements
- - bitmap, x, y
+ <p>The type or format of the data, generally given by a <a href=#mime-type>MIME
+ type</a>. Some values that are not <a href=#mime-type title="MIME type">MIME
+ types</a> are special-cased for legacy reasons. The API does
+ not enforce the use of <a href=#mime-type title="MIME type">MIME types</a>;
+ other values can be used as well. In all cases, however, the
+ values are all <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a> by the
+ API.</p>
-plan:
- 1. describe model
- 2. replace the existing API definitions with links to this model
- 3. expose model with new API
- 4. add dropzone="..." feature
+ </li>
--->
+ <li>
+
+ <p>The kind of data:</p>
+
+ <dl><dt>Plain Unicode string</dt>
+ <dd>
+ <p>Raw text.</p>
+ </dd>
+
+ <dt>Blob</dt>
+ <dd>
+ <p>Binary data.</p>
+ </dd>
+
+ <dt>File</dt>
+ <dd>
+ <p>Binary data with a file name.</p>
+ </dd>
+
+ </dl></li>
+
+ </ul><p>The information in a <a href=#drag-data-store>drag data store</a> used to
+ generate the UI feedback during the drag consists of:</p>
+
+ <ul><li>A list of zero or more elements.</li>
+
+ <li>Optionally, a bitmap image and the coordinate of a point within
+ that image.</li>
+
+ </ul><p>A <a href=#drag-data-store>drag data store</a> is created at the start of a
+ drag-and-drop operation in the <i>read/write mode</i>, and then
+ progresses through the following three modes as the operation
+ proceeds:</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>
+ <dl><dt>Read/write mode</dt>
+ <dd>
+
+ <p>At the start of the drag. New data can be added to the
+ <a href=#drag-data-store>drag data store</a>.</p>
+
+ </dd>
+
+ <dt>Protected mode</dt>
+ <dd>
+
+ <p>During the drag. The formats and kinds in the <a href=#drag-data-store>drag data
+ store</a> list of items representing dragged data can be
+ enumerated, but the data itself is unavailable and no new data can
+ be added.</p>
+
+ </dd>
+
+ <dt>Read-only mode</dt>
+ <dd>
+
+ <p>After the drop. The list of items representing dragged data can
+ be read, including the data. No new data can be added.</p>
+
+ </dd>
+
+ </dl><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>
<dd>
@@ -66099,7 +66154,17 @@ plan:
</dd>
- </dl><div class=impl>
+ </dl><!--
+
+XXX
+
+plan:
+ 2. replace the existing API definitions with links to this model
+ 3. make it clear there's a new DataTransfer object with each event
+ 4. expose model with new API
+ 5. add dropzone="..." feature
+
+--><div class=impl>
<p>When a <code><a href=#datatransfer>DataTransfer</a></code> object is created, it must be
initialized as follows:</p>
View
125 source
@@ -75153,33 +75153,104 @@ interface <dfn>NavigatorAbilities</dfn> {
void <span title="dom-DataTransfer-addElement">addElement</span>(in Element element);
};</pre>
- <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. 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>
+ <p><code>DataTransfer</code> objects are used to expose the data
+ that underlies a drag-and-drop operation.</p>
-<!--
+ <p>The data that underlies a drag-and-drop operation, known as the
+ <dfn>drag data store</dfn>, consists of an unordered list of items
+ representing the dragged data, and some information used to generate
+ the UI feedback during the drag.</p>
-XXX
+ <p>Each item representing dragged data in a <span>drag data
+ store</span> has the following information:</p>
-here we say what the DataTransfer objects model is, and that it can be in a read/write mode, secret mode, read-only mode
+ <ul>
-model is:
- - list of items (see DataTransferItem above)
- - the drag image (search for "drag feedback"):
- - elements
- - bitmap, x, y
+ <li>
-plan:
- 1. describe model
- 2. replace the existing API definitions with links to this model
- 3. expose model with new API
- 4. add dropzone="..." feature
+ <p>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>
--->
+ </li>
+
+ <li>
+
+ <p>The kind of data:</p>
+
+ <dl>
+
+ <dt>Plain Unicode string</dt>
+ <dd>
+ <p>Raw text.</p>
+ </dd>
+
+ <dt>Blob</dt>
+ <dd>
+ <p>Binary data.</p>
+ </dd>
+
+ <dt>File</dt>
+ <dd>
+ <p>Binary data with a file name.</p>
+ </dd>
+
+ </dl>
+
+ </li>
+
+ </ul>
+
+ <p>The information in a <span>drag data store</span> used to
+ generate the UI feedback during the drag consists of:</p>
+
+ <ul>
+
+ <li>A list of zero or more elements.</li>
+
+ <li>Optionally, a bitmap image and the coordinate of a point within
+ that image.</li>
+
+ </ul>
+
+ <p>A <span>drag data store</span> is created at the start of a
+ drag-and-drop operation in the <i>read/write mode</i>, and then
+ progresses through the following three modes as the operation
+ proceeds:</p>
+
+ <dl>
+
+ <dt>Read/write mode</dt>
+ <dd>
+
+ <p>At the start of the drag. New data can be added to the
+ <span>drag data store</span>.</p>
+
+ </dd>
+
+ <dt>Protected mode</dt>
+ <dd>
+
+ <p>During the drag. The formats and kinds in the <span>drag data
+ store</span> list of items representing dragged data can be
+ enumerated, but the data itself is unavailable and no new data can
+ be added.</p>
+
+ </dd>
+
+ <dt>Read-only mode</dt>
+ <dd>
+
+ <p>After the drop. The list of items representing dragged data can
+ be read, including the data. No new data can be added.</p>
+
+ </dd>
+
+ </dl>
<dl class="domintro">
@@ -75278,6 +75349,18 @@ plan:
</dl>
+<!--
+
+XXX
+
+plan:
+ 2. replace the existing API definitions with links to this model
+ 3. make it clear there's a new DataTransfer object with each event
+ 4. expose model with new API
+ 5. add dropzone="..." feature
+
+-->
+
<div class="impl">
<p>When a <code>DataTransfer</code> object is created, it must be

0 comments on commit 1928d48

Please sign in to comment.