[html5] r2887 - [] (0) Make the structured data cloning algorithm support RegExp, ImageData, and [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Mar 20 15:13:07 PDT 2009


Author: ianh
Date: 2009-03-20 15:13:06 -0700 (Fri, 20 Mar 2009)
New Revision: 2887

Modified:
   index
   source
Log:
[] (0) Make the structured data cloning algorithm support RegExp, ImageData, and be more explicit and prototypes and Error objects.

Modified: index
===================================================================
--- index	2009-03-20 21:36:18 UTC (rev 2886)
+++ index	2009-03-20 22:13:06 UTC (rev 2887)
@@ -6429,8 +6429,27 @@
 
    <dd><p>Return a newly constructed <code>Date</code> object with the same value as <var title="">input</var>.</dd>
 
-   <dt>If <var title="">input</var> is a host object</dt>
+   <dt>If <var title="">input</var> is a <code>RegExp</code> object</dt>
 
+   <dd>
+
+    <p>Return a newly constructed <code>RegExp</code> object with the same pattern and flags as <var title="">input</var>.</p>
+
+    <p class=note>The value of the <code title="">lastIndex</code> property is not copied.</p>
+
+   </dd>
+
+   <dt>If <var title="">input</var> is a <code><a href=#imagedata>ImageData</a></code> object</dt>
+
+   <dd><p>Return a newly constructed <code><a href=#imagedata>ImageData</a></code> object
+   with the same <code title=dom-imagedata-width><a href=#dom-imagedata-width>width</a></code> and
+   <code title=dom-imagedata-height><a href=#dom-imagedata-height>height</a></code> as <var title="">input</var>, and with a newly constructed
+   <code><a href=#canvaspixelarray>CanvasPixelArray</a></code> for its <code title=dom-imagedata-data><a href=#dom-imagedata-data>data</a></code> attribute, with the same
+   <code title=dom-canvaspixelarray-length><a href=#dom-canvaspixelarray-length>length</a></code> and pixel
+   values as the <var title="">input</var>'s.</dd>
+
+   <dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>
+
    <dd><p>Return the null value.</dd>
 
    <dt>If <var title="">input</var> is an Array object</dt>
@@ -6450,19 +6469,29 @@
      same type as <var title="">input</var>: either an Array or an
      Object.</li>
 
-     <li><p>For each property in <var title="">input</var>, add a
-     corresponding property to <var title="">output</var> having the
-     same name, and having a value created from invoking the
-     <a href=#internal-structured-cloning-algorithm>internal structured cloning algorithm</a> recursively
-     with the value of the property as the "<var title="">input</var>"
-     argument and <var title="">new memory</var> as the "<var title="">memory</var>" argument. The order of the properties in
-     the <var title="">input</var> and <var title="">output</var>
-     objects must be the same.</li>
+     <li>
 
+      <p>For each enumerable property in <var title="">input</var>,
+      add a corresponding property to <var title="">output</var>
+      having the same name, and having a value created from invoking
+      the <a href=#internal-structured-cloning-algorithm>internal structured cloning algorithm</a>
+      recursively with the value of the property as the "<var title="">input</var>" argument and <var title="">new
+      memory</var> as the "<var title="">memory</var>" argument. The
+      order of the properties in the <var title="">input</var> and
+      <var title="">output</var> objects must be the same.</p>
+
+      <p class=note>This does not walk the prototype chain.</p>
+
+     </li>
+
      <li><p>Return <var title="">output</var>.</li>
 
     </ol></dd>
 
+   <dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>)</dt>
+
+   <dd><p>Return the null value.</dd>
+
   </dl></div>
 
 

Modified: source
===================================================================
--- source	2009-03-20 21:36:18 UTC (rev 2886)
+++ source	2009-03-20 22:13:06 UTC (rev 2887)
@@ -6471,8 +6471,29 @@
 
    <dd><p>Return a newly constructed <code>Date</code> object with the same value as <var title="">input</var>.</p></dd>
 
-   <dt>If <var title="">input</var> is a host object</dt>
+   <dt>If <var title="">input</var> is a <code>RegExp</code> object</dt>
 
+   <dd>
+
+    <p>Return a newly constructed <code>RegExp</code> object with the same pattern and flags as <var title="">input</var>.</p>
+
+    <p class="note">The value of the <code title="">lastIndex</code> property is not copied.</p>
+
+   </dd>
+
+   <dt>If <var title="">input</var> is a <code>ImageData</code> object</dt>
+
+   <dd><p>Return a newly constructed <code>ImageData</code> object
+   with the same <code title="dom-imagedata-width">width</code> and
+   <code title="dom-imagedata-height">height</code> as <var
+   title="">input</var>, and with a newly constructed
+   <code>CanvasPixelArray</code> for its <code
+   title="dom-imagedata-data">data</code> attribute, with the same
+   <code title="dom-canvaspixelarray-length">length</code> and pixel
+   values as the <var title="">input</var>'s.</p></dd>
+
+   <dt>If <var title="">input</var> is a host object (e.g. a DOM node)</dt>
+
    <dd><p>Return the null value.</p></dd>
 
    <dt>If <var title="">input</var> is an Array object</dt>
@@ -6495,22 +6516,32 @@
      same type as <var title="">input</var>: either an Array or an
      Object.</p></li>
 
-     <li><p>For each property in <var title="">input</var>, add a
-     corresponding property to <var title="">output</var> having the
-     same name, and having a value created from invoking the
-     <span>internal structured cloning algorithm</span> recursively
-     with the value of the property as the "<var title="">input</var>"
-     argument and <var title="">new memory</var> as the "<var
-     title="">memory</var>" argument. The order of the properties in
-     the <var title="">input</var> and <var title="">output</var>
-     objects must be the same.</p></li>
+     <li>
 
+      <p>For each enumerable property in <var title="">input</var>,
+      add a corresponding property to <var title="">output</var>
+      having the same name, and having a value created from invoking
+      the <span>internal structured cloning algorithm</span>
+      recursively with the value of the property as the "<var
+      title="">input</var>" argument and <var title="">new
+      memory</var> as the "<var title="">memory</var>" argument. The
+      order of the properties in the <var title="">input</var> and
+      <var title="">output</var> objects must be the same.</p>
+
+      <p class="note">This does not walk the prototype chain.</p>
+
+     </li>
+
      <li><p>Return <var title="">output</var>.</p></li>
 
     </ol>
 
    </dd>
 
+   <dt>If <var title="">input</var> is another native object type (e.g. <code>Error</code>)</dt>
+
+   <dd><p>Return the null value.</p></dd>
+
   </dl>
 
   </div>




More information about the Commit-Watchers mailing list