HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/2002

File a bug

SVNBugCommentTime (UTC)
2002[Opera] Define processing for the second argument to getDataURL() for image/jpeg.2008-08-05 09:21
Index: source
===================================================================
--- source	(revision 2001)
+++ source	(revision 2002)
@@ -946,10 +946,7 @@
   <!-- XXX DOMB -->
   <p>Unless otherwise specified, if a method is passed more arguments than
   is defined for that method in its IDL definition, the excess
-  arguments must be ignored.</p> <!-- XXX When updating this spec for
-  Bindings-For-DOM-compliance, also remove or consider the equivalent
-  requirement in the canvas section for toDataURL() and
-  getContext(). -->
+  arguments must be ignored.</p>
   
 
 
@@ -17851,7 +17848,7 @@
            attribute unsigned long <span title="dom-canvas-height">height</span>;
 
   DOMString <span title="dom-canvas-toDataURL">toDataURL</span>();
-  DOMString <span title="dom-canvas-toDataURL-type">toDataURL</span>(in DOMString type);
+  DOMString <span title="dom-canvas-toDataURL-type">toDataURL</span>(in DOMString type, [Variadic] in any args);
 
   DOMObject <span title="dom-canvas-getContext">getContext</span>(in DOMString contextId);
 };</pre>
@@ -18037,16 +18034,17 @@
     <tr>
      <td> image/jpeg
      <td> The second argument, if it is a number between 0.0 and 1.0,
-     must be treated as the desired quality level.
+     must be treated as the desired quality level. If it is no a
+     number or is outside that range, the user agent must use its
+     default value, as if the argument had been omitted.
   </table>
 
   <p>Other arguments must be ignored and must not cause the user agent
-  to raise an exception (as would normally occur if a method was
-  called with the wrong number of arguments). A future version of this
-  specification will probably allow extra parameters to be passed to
-  <code title="dom-canvas-toDataURL">toDataURL()</code> to allow
-  authors to more carefully control compression settings, image
-  metadata, etc.</p>
+  to raise an exception. A future version of this specification will
+  probably define other parameters to be passed to <code
+  title="dom-canvas-toDataURL">toDataURL()</code> to allow authors to
+  more carefully control compression settings, image metadata,
+  etc.</p>
 
 
   <h5>The 2D context</h5>

|