- From: Eric Uhrhane via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 06 Apr 2011 19:38:55 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/file-system
In directory hutz:/tmp/cvs-serv31143
Modified Files:
file-writer.html
Log Message:
Resolve http://www.w3.org/2008/webapps/track/issues/173.
Also fixed a few typos.
Index: file-writer.html
===================================================================
RCS file: /sources/public/2009/dap/file-system/file-writer.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- file-writer.html 26 Oct 2010 00:09:43 -0000 1.25
+++ file-writer.html 6 Apr 2011 19:38:53 -0000 1.26
@@ -308,7 +308,7 @@
<dd>
<p>
When the <code>abort</code> method is called, <a>user agents</a>
- MUST run the steps below:<!-->TODO: refs<-->
+ MUST run the steps below:
<ol>
<li>If <code>readyState</code> is <code>DONE</code> or
<code>INIT</code>, throw a <code>FileException</code> with error
@@ -316,12 +316,14 @@
series of steps.</li>
<li>Terminate any steps having to do with writing a file.</li>
<li>Set the error attribute to a FileError object with the
- appropriate code (in this case, ABORT_ERR; see error
- conditions).</li>
- <li>Dispatch a progress event called error.</li>
- <li>Dispatch a progress event called abort</li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called writeend</li>
+ code <a>ABORT_ERR</a>.</li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Set <code>readyState</code> to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called error.</li>
+ <li>Dispatch a progress event called abort</li>
+ <li>Dispatch a progress event called writeend</li>
+ </ol></li>
<li>Stop dispatching any further progress events.</li>
</ol>
</p>
@@ -349,8 +351,8 @@
<dd>
<p>
The FileSaver object can be in one of 3 states. The
- <a>readyState</a> attribute, on getting, MUST return the current
- state, which MUST be one of the following values:
+ <code>readyState</code> attribute, on getting, MUST return the
+ current state, which MUST be one of the following values:
<ul>
<li><a>INIT</a></li>
<li><a>WRITING</a></li>
@@ -408,7 +410,7 @@
Blob of data to be saved to a file.
</p>
<p>
- When the <a>FileSaver</a> contructor is called, the <a>user agent</a>
+ When the <a>FileSaver</a> constructor is called, the <a>user agent</a>
MUST return a new <a>FileSaver</a> object with <code>readyState</code>
set to <code>INIT</code>.
</p>
@@ -420,10 +422,10 @@
</section>
<section>
<h2>The FileSaver Task Source</h2>
- <!-->
+ <!--
TODO: Figure out how to do the references properly. Maybe just use raw
links to a reference section, as in the File API spec.
- <-->
+ -->
<p>
The <a>FileSaver</a> interface enables asynchronous writes on
individual files by dispatching events to event handler methods. Unless
@@ -433,7 +435,7 @@
event tasks that are queued for dispatching.
</p>
<p>
- After its contructor has returned, a new FileSaver MUST asynchronously
+ After its constructor has returned, a new FileSaver MUST asynchronously
execute the following steps.
</p>
<ol>
@@ -445,23 +447,28 @@
<code>error</code> attribute MUST be a <code>FileError</code>
object with a valid error code that indicates the kind of file
error that has occurred.</li>
- <li>Dispatch a progress event called <code>error</code>.</li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called <code>writeend</code>.</li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called
+ <code>error</code>.</li>
+ <li>Dispatch a progress event called
+ <code>writeend</code>.</li>
+ </ol></li>
<li>Terminate this overall set of steps.</li>
</ol>
</li>
<li>Queue a task to dispatch a progress event called
<code>writestart</code>.</li>
<li>Make progress notifications.</li>
- <li>When the data has been fully written:
+ <li>When the data has been fully written, queue a task that will:
<ol>
- <li>Dispatch a progress event called <code>write</code></li>
<li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called <code>write</code></li>
<li>Dispatch a progress event called <code>writeend</code></li>
- <li>Terminate this overall set of steps.</li>
</ol>
</li>
+ <li>Terminate this overall set of steps.</li>
</ol>
</section>
<section>
@@ -522,7 +529,7 @@
<div class=issue>
<p>
It seems like this should have a blocking constructor and no methods
- or properties, if it's to follow the contructor-based model of the
+ or properties, if it's to follow the constructor-based model of the
asynchronous interface. A global method seems like it would be
cleaner, though. Is it important that they match? If so, the asynch
constructor could turn into a method instead.
@@ -583,10 +590,14 @@
<code>error</code> attribute MUST be a <code>FileError</code>
object with a valid error code that indicates the kind of file
error that has occurred.</li>
- <li>Dispatch a progress event called <code>error</code>.</li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called
- <code>writeend</code></li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Dispatch a progress event called
+ <code>error</code>.</li>
+ <li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called
+ <code>writeend</code></li>
+ </ol></li>
<li>On getting, the <code>length</code> and
<code>position</code> attributes SHOULD indicate any
fractional data successfully written to the file.</li>
@@ -606,10 +617,14 @@
indicate an increase of <code>data.size</code> over their
pre-write states, indicating the change to the underlying
file.</li>
- <li>Dispatch a progress event called <code>write</code></li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called
- <code>writeend</code></li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Dispatch a progress event called
+ <code>write</code></li>
+ <li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called
+ <code>writeend</code></li>
+ </ol></li>
<li>Terminate this overall set of steps.</li>
</ol>
</ol>
@@ -679,10 +694,14 @@
<code>error</code> attribute MUST be a <code>FileError</code>
object with a valid error code that indicates the kind of file
error that has occurred.</li>
- <li>Dispatch a progress event called <code>error</code>.</li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called
- <code>writeend</code></li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called
+ <code>error</code>.</li>
+ <li>Dispatch a progress event called
+ <code>writeend</code></li>
+ </ol></li>
<li>On getting, the <code>length</code> and
<code>position</code> attributes SHOULD indicate any
modification to the file.</li>
@@ -700,9 +719,13 @@
<li><code>size</code>.</li>
</ul>
</li>
- <li>Dispatch a progress event called <code>write</code></li>
- <li>Set readyState to <code>DONE</code>.</li>
- <li>Dispatch a progress event called <code>writeend</code></li>
+ <li>Queue a task that will:
+ <ol>
+ <li>Set readyState to <code>DONE</code>.</li>
+ <li>Dispatch a progress event called <code>write</code></li>
+ <li>Dispatch a progress event called
+ <code>writeend</code></li>
+ </ol></li>
<li>Terminate this overall set of steps.</li>
</ul>
</li>
@@ -845,7 +868,6 @@
</section>
<section>
<h2>Errors and Exceptions</h2>
- <!--TODO: link all these exceptions-->
<p>
Error conditions can occur when attempting to write files. The list
below of potential error conditions is informative, with links to
Received on Wednesday, 6 April 2011 19:38:57 UTC