[html5] r4870 - [giow] (1) Move the 'ports' argument to the end of postMessage() instead of in t [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 25 16:57:22 PDT 2010


Author: ianh
Date: 2010-03-25 16:57:20 -0700 (Thu, 25 Mar 2010)
New Revision: 4870

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Move the 'ports' argument to the end of postMessage() instead of in the middle.

Modified: complete.html
===================================================================
--- complete.html	2010-03-25 21:32:48 UTC (rev 4869)
+++ complete.html	2010-03-25 23:57:20 UTC (rev 4870)
@@ -52909,7 +52909,7 @@
 
   // <a href=#crossDocumentMessages>cross-document messaging</a>
   void <a href=#dom-window-postmessage-2 title=dom-window-postMessage-2>postMessage</a>(in any message, in DOMString targetOrigin);
-  void <a href=#dom-window-postmessage-3 title=dom-window-postMessage-3>postMessage</a>(in any message, in <a href=#messageportarray>MessagePortArray</a> ports, in DOMString targetOrigin);
+  void <a href=#dom-window-postmessage-3 title=dom-window-postMessage-3>postMessage</a>(in any message, in DOMString targetOrigin, in <a href=#messageportarray>MessagePortArray</a> ports);
 
   // <a href=#event-handler-idl-attributes>event handler IDL attributes</a>
            attribute <a href=#function>Function</a> <a href=#handler-onabort title=handler-onabort>onabort</a>;
@@ -70660,9 +70660,9 @@
 
   <h4 id=posting-messages-with-message-ports><span class=secno>10.4.4 </span>Posting messages with message ports</h4>
 
-  <p>When a script invokes the <dfn id=dom-window-postmessage-3 title=dom-window-postMessage-3><code>postMessage(<var title="">message</var>, <var title="">ports</var>, <var title="">targetOrigin</var>)</code></dfn> method (with three
-  arguments) on a <code><a href=#window>Window</a></code> object, the user agent must
-  follow these steps:
+  <p>When a script invokes the <dfn id=dom-window-postmessage-3 title=dom-window-postMessage-3><code>postMessage(<var title="">message</var>, <var title="">targetOrigin</var>, <var title="">ports</var>)</code></dfn> method (with three arguments) on
+  a <code><a href=#window>Window</a></code> object, the user agent must follow these
+  steps:
 
   <ol><!-- EXCEPT WHERE NOTED, THESE STEPS ARE IDENTICAL TO THE PREVIOUS SECTION --><!-- one exception is the use of -3 instead of -2 in the xrefs --><li>
 
@@ -70812,7 +70812,7 @@
   <p>One of the ports is kept as the local port, and the other port is
   sent to the remote code, e.g. using <code title=dom-window-postMessage-3><a href=#dom-window-postmessage-3>postMessage()</a></code>:</p>
 
-  <pre>otherWindow.postMessage('hello', [channel.port2], 'http://example.com');</pre>
+  <pre>otherWindow.postMessage('hello', 'http://example.com', [channel.port2]);</pre>
 
   <p>To send messages, the <code title=dom-MessagpePort-postMessage>postMessage()</code> method on
   the port is used:</p>

Modified: index
===================================================================
--- index	2010-03-25 21:32:48 UTC (rev 4869)
+++ index	2010-03-25 23:57:20 UTC (rev 4870)
@@ -52810,7 +52810,7 @@
 
   // <a href=#crossDocumentMessages>cross-document messaging</a>
   void <a href=#dom-window-postmessage-2 title=dom-window-postMessage-2>postMessage</a>(in any message, in DOMString targetOrigin);
-  void <a href=#dom-window-postmessage-3 title=dom-window-postMessage-3>postMessage</a>(in any message, in <a href=#messageportarray>MessagePortArray</a> ports, in DOMString targetOrigin);
+  void <a href=#dom-window-postmessage-3 title=dom-window-postMessage-3>postMessage</a>(in any message, in DOMString targetOrigin, in <a href=#messageportarray>MessagePortArray</a> ports);
 
   // <a href=#event-handler-idl-attributes>event handler IDL attributes</a>
            attribute <a href=#function>Function</a> <a href=#handler-onabort title=handler-onabort>onabort</a>;
@@ -64644,9 +64644,9 @@
 
   <h4 id=posting-messages-with-message-ports><span class=secno>9.2.4 </span>Posting messages with message ports</h4>
 
-  <p>When a script invokes the <dfn id=dom-window-postmessage-3 title=dom-window-postMessage-3><code>postMessage(<var title="">message</var>, <var title="">ports</var>, <var title="">targetOrigin</var>)</code></dfn> method (with three
-  arguments) on a <code><a href=#window>Window</a></code> object, the user agent must
-  follow these steps:
+  <p>When a script invokes the <dfn id=dom-window-postmessage-3 title=dom-window-postMessage-3><code>postMessage(<var title="">message</var>, <var title="">targetOrigin</var>, <var title="">ports</var>)</code></dfn> method (with three arguments) on
+  a <code><a href=#window>Window</a></code> object, the user agent must follow these
+  steps:
 
   <ol><!-- EXCEPT WHERE NOTED, THESE STEPS ARE IDENTICAL TO THE PREVIOUS SECTION --><!-- one exception is the use of -3 instead of -2 in the xrefs --><li>
 
@@ -64796,7 +64796,7 @@
   <p>One of the ports is kept as the local port, and the other port is
   sent to the remote code, e.g. using <code title=dom-window-postMessage-3><a href=#dom-window-postmessage-3>postMessage()</a></code>:</p>
 
-  <pre>otherWindow.postMessage('hello', [channel.port2], 'http://example.com');</pre>
+  <pre>otherWindow.postMessage('hello', 'http://example.com', [channel.port2]);</pre>
 
   <p>To send messages, the <code title=dom-MessagpePort-postMessage>postMessage()</code> method on
   the port is used:</p>

Modified: source
===================================================================
--- source	2010-03-25 21:32:48 UTC (rev 4869)
+++ source	2010-03-25 23:57:20 UTC (rev 4870)
@@ -59557,7 +59557,7 @@
 
 <!--END w3c-html-->  // <span>cross-document messaging</span>
   void <span title="dom-window-postMessage-2">postMessage</span>(in any message, in DOMString targetOrigin);
-  void <span title="dom-window-postMessage-3">postMessage</span>(in any message, in <span>MessagePortArray</span> ports, in DOMString targetOrigin);
+  void <span title="dom-window-postMessage-3">postMessage</span>(in any message, in DOMString targetOrigin, in <span>MessagePortArray</span> ports);
 <!--START w3c-html-->
   // <span>event handler IDL attributes</span>
            attribute <span>Function</span> <span title="handler-onabort">onabort</span>;
@@ -79420,10 +79420,10 @@
 
   <p>When a script invokes the <dfn
   title="dom-window-postMessage-3"><code>postMessage(<var
-  title="">message</var>, <var title="">ports</var>, <var
-  title="">targetOrigin</var>)</code></dfn> method (with three
-  arguments) on a <code>Window</code> object, the user agent must
-  follow these steps:
+  title="">message</var>, <var title="">targetOrigin</var>, <var
+  title="">ports</var>)</code></dfn> method (with three arguments) on
+  a <code>Window</code> object, the user agent must follow these
+  steps:
 
   <ol>
 
@@ -79594,7 +79594,7 @@
   sent to the remote code, e.g. using <code
   title="dom-window-postMessage-3">postMessage()</code>:</p>
 
-  <pre>otherWindow.postMessage('hello', [channel.port2], 'http://example.com');</pre>
+  <pre>otherWindow.postMessage('hello', 'http://example.com', [channel.port2]);</pre>
 
   <p>To send messages, the <code
   title="dom-MessagpePort-postMessage">postMessage()</code> method on




More information about the Commit-Watchers mailing list