- From: Eric Uhrhane via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 05 Mar 2012 22:52:20 +0000
- To: public-dap-commits@w3.org
Update of /sources/public/2009/dap/file-system
In directory hutz:/tmp/cvs-serv26255
Modified Files:
file-writer.html
Log Message:
Tweak abort and add some links.
Index: file-writer.html
===================================================================
RCS file: /sources/public/2009/dap/file-system/file-writer.html,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- file-writer.html 28 Feb 2012 23:36:55 -0000 1.34
+++ file-writer.html 5 Mar 2012 22:52:18 -0000 1.35
@@ -103,8 +103,23 @@
<p>
The terms and algorithms <dfn>event handler attributes</dfn>, <dfn>event
handler event types</dfn>, <dfn>Function</dfn>, <dfn>task</dfn>,
- <dfn>task source</dfn>, and <dfn>queue a task</dfn> are defined by the
- HTML 5 specification [[!HTML5]].
+ <dfn>task queue</dfn>, <dfn>task source</dfn>, and <dfn>queue a
+ task</dfn> are defined by the HTML 5 specification [[!HTML5]].
+ </p>
+ <p>
+ When this specification refers to a <dfn>write method</dfn>, it includes
+ both <a>write</a> and <a>truncate</a>.
+ </p>
+ <p>
+ When this specification refers to a <dfn>write algorithm</dfn>, it
+ includes the algorithm invoked by any <a>write method</a> as well as the
+ <a>FileSaver write algorithm</a>.
+ </p>
+ <p>
+ When this specification says to <dfn>terminate</dfn> an algorithm the
+ user agent must terminate the algorithm after finishing the step it is
+ on. Any <a>write algorithm</a> defined in this specification can be
+ terminated by an abort() call.
</p>
<p>
The term <dfn>Blob</dfn> is defined by the File API specification
@@ -310,17 +325,20 @@
When the <code>abort</code> method is called, <a>user agents</a>
MUST run the steps below:
<ol>
- <li>If <code>readyState</code> is <code>DONE</code> or
- <code>INIT</code>, terminate this overall series of steps without
- doing anything else..</li>
- <li>Terminate any steps having to do with writing a file.</li>
- <li>Set the <code>error</code> attribute to a FileError object
- with the code <a>ABORT_ERR</a>.</li>
+ <li>If <code>readyState == DONE</code> or
+ <code>readyState == INIT</code>, terminate this
+ overall series of steps without doing anything else.</li>
<li>Set <code>readyState</code> to <code>DONE</code>.</li>
+ <li>If there are any <a>task</a>s from the object's FileSaver
+ <a>task source</a> in one of the <a>task queue</a>s, then remove
+ those <a>task</a>s.</li>
+ <li><a>Terminate</a> the <a>write algorithm</a> being
+ processed.</li>
+ <li>Set the <code>error</code> attribute to a FileError object
+ with the code <a>ABORT_ERR</a>.</li>
<li>Dispatch a progress event called abort</li>
<li>Dispatch a progress event called writeend</li>
- <li>Stop dispatching any further progress events.</li>
- <li>Terminate this overall set of steps.</li>
+ <li>Terminate this algorithm.</li>
</ol>
</p>
</dd>
@@ -427,14 +445,15 @@
</p>
<p>
After its constructor has returned, a new FileSaver MUST asynchronously
- execute the following steps.
+ execute the following steps. They are referred to elsewhere as the
+ <dfn>FileSaver write algorithm</dfn>.
</p>
<ol>
<li>Set <code>readyState</code> to <code>WRITING</code>.</li>
<li>If an error occurs during file write, proceed to the error steps
below.
<ol>
- <li>Queue a task that will:
+ <li><a>Queue a task</a> that will:
<ol>
<li>Set the <code>error</code> attribute; on getting the
<code>error</code> attribute MUST be a
@@ -449,10 +468,10 @@
<li>Terminate this overall set of steps.</li>
</ol>
</li>
- <li>Queue a task to dispatch a progress event called
+ <li><a>Queue a task</a> to dispatch a progress event called
<code>writestart</code>.</li>
<li>Make progress notifications.</li>
- <li>When the data has been fully written, queue a task that will:
+ <li>When the data has been fully written, <a>queue a task</a> that will:
<ol>
<li>Set readyState to <code>DONE</code>.</li>
<li>Dispatch a progress event called <code>write</code></li>
@@ -593,8 +612,8 @@
</ol>
</li>
<li>Dispatch a progress event called <code>writestart</code>.</li>
- <li>Return from the write method, but continue processing the
- other steps in this algorithm.</li>
+ <li>Return from the write method, but continue processing
+ the other steps in this algorithm.</li>
<li>Make progress notifications. On getting, while processing the
<code>write</code> method, the <code>length</code> and
<code>position</code> attributes SHOULD indicate the progress
@@ -857,9 +876,9 @@
</p>
<p>
The directory containing the file being written may not exist at the
- time one of the asynchronous write methods or synchronous write methods
- is called. This may be due to it having been moved or deleted after a
- reference to it was acquired (e.g. concurrent modification with another
+ time an asynchronous or synchronous <a>write method</a> is called. This
+ may be due to it having been moved or deleted after a reference to it
+ was acquired (e.g. concurrent modification with another
application).<br/>
See <a>NOT_FOUND_ERR</a>.
</p>
@@ -889,7 +908,8 @@
</p>
<p>
During the writing of a file, the web application may itself wish to
- abort (see abort()) the call to an asynchronous write method.<br/>
+ abort (see abort()) the call to an asynchronous <a>write
+ method</a>.<br/>
See <a>ABORT_ERR</a>.
</p>
<p>
@@ -936,8 +956,8 @@
This interface extends the <a>FileException</a> interface described in
[[!FILE-API]] to add several new error codes.
Any errors that need to be reported synchronously, including all that
- occur during use of the synchronous write methods for Web Workers
- [[WEBWORKERS]] are reported using the FileException exception.
+ occur during use of any synchronous <a>write method</a> for Web
+ Workers [[WEBWORKERS]] are reported using the FileException exception.
<dl title='exception FileException' class='idl'>
<dt>const unsigned short NOT_FOUND_ERR = 1</dt>
<dd> </dd>
Received on Monday, 5 March 2012 22:52:22 UTC