|
|
|
|
|
|
|
|
<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p> |
|
|
<hgroup><h1 class=allcaps>HTML</h1> |
|
|
<h2 class="no-num no-toc">Living Standard — Last Updated 6 January 2012</h2> |
|
|
<h2 class="no-num no-toc">Living Standard — Last Updated 7 January 2012</h2> |
|
|
</hgroup><dl><dt><strong>Web developer edition:</strong></dt> |
|
|
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd> |
|
|
<dt>Multiple-page version:</dt> |
|
|
|
|
<li><p>Let <var title="">arguments</var> be the second and |
|
|
subsequent arguments to the method, if any.</li> |
|
|
|
|
|
<li><p>Let <var title="">file</var> be <a href=#a-serialization-of-the-image-as-a-file>a serialization of the |
|
|
image as a file</a>, using <var title="">arguments</var>.</li> |
|
|
<li> |
|
|
|
|
|
<p>If the canvas has no pixels (i.e. either its horizontal |
|
|
dimension or its vertical dimension is zero) then let <var title="">result</var> be null.</p> |
|
|
|
|
|
<p>Otherwise, let <var title="">result</var> be a |
|
|
<code><a href=#blob>Blob</a></code> object representing <a href=#a-serialization-of-the-image-as-a-file>a serialization of the |
|
|
image as a file</a>, using <var title="">arguments</var>.</p> |
|
|
|
|
|
</li> |
|
|
|
|
|
<li><p>Return, but continue running these steps |
|
|
asynchronously.</li> |
|
|
|
|
steps.</li> |
|
|
|
|
|
<li><p><a href=#queue-a-task>Queue a task</a> to invoke the |
|
|
<code>FileCallback</code> <var title="">callback</var> with a |
|
|
<code><a href=#blob>Blob</a></code> object representing <var title="">file</var> as |
|
|
its argument. The <a href=#task-source>task source</a> for this task is the |
|
|
<dfn id=canvas-blob-serialization-task-source>canvas blob serialization task source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li> |
|
|
<code>FileCallback</code> <var title="">callback</var> with <var title="">result</var> as its argument. The <a href=#task-source>task source</a> |
|
|
for this task is the <dfn id=canvas-blob-serialization-task-source>canvas blob serialization task |
|
|
source</dfn>. <a href=#refsFILESYSTEMAPI>[FILESYSTEMAPI]</a> <a href=#refsFILEAPI>[FILEAPI]</a> </li> |
|
|
|
|
|
</ol><p>When a user agent is to create <dfn id=a-serialization-of-the-image-as-a-file>a serialization of the image |
|
|
as a file</dfn>, optionally with some given <var title="">arguments</var>, it must create an image file in the format |