- From: CVS User ihickson <cvsmail@w3.org>
- Date: Fri, 17 Jan 2014 08:12:30 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/postmsg In directory roscoe:/tmp/cvs-serv25589 Modified Files: Overview.html Log Message: Various editorial tweaks. (whatwg r8405) --- /sources/public/html5/postmsg/Overview.html 2014/01/08 23:55:12 1.162 +++ /sources/public/html5/postmsg/Overview.html 2014/01/17 08:12:30 1.163 @@ -216,7 +216,7 @@ <h1>HTML5 Web Messaging</h1> - <h2 class="no-num no-toc" id="editor-s-draft-8-january-2014">Editor's Draft 8 January 2014</h2> + <h2 class="no-num no-toc" id="editor-s-draft-17-january-2014">Editor's Draft 17 January 2014</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/webmessaging/">http://www.w3.org/TR/webmessaging/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -348,7 +348,7 @@ </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 8 January 2014 Editor's Draft. + This specification is the 17 January 2014 Editor's Draft. </p> @@ -545,10 +545,9 @@ <dd> - <p>Returns the <code>WindowProxy</code> of the source window, for <a href="#web-messaging">cross-document - messaging</a>, and the <code><a href="#messageport">MessagePort</a></code> being attached, in the <code title="event-WorkerGlobalScope-connect">connect</code> event fired at <code>SharedWorkerGlobalScope</code> - objects.</p> + messaging</a>, and the <code><a href="#messageport">MessagePort</a></code> being attached, in the <code title="event-WorkerGlobalScope-connect">connect</code> event fired at + <code>SharedWorkerGlobalScope</code> objects.</p> </dd> @@ -744,144 +743,90 @@ <p>When a script invokes the <dfn id="dom-window-postmessage" title="dom-window-postMessage"><code>postMessage(<var title="">message</var>, <var title="">targetOrigin</var>, <var title="">transfer</var>)</code></dfn> method (with two or three arguments) on a <code>Window</code> object, the user agent must follow these steps:</p> - <ol><li> - - <p>If the value of the <var title="">targetOrigin</var> argument is neither a single U+002A - ASTERISK character (*), a single U+002F SOLIDUS character (/), nor an <span>absolute URL</span>, - then throw a <code>SyntaxError</code> exception and abort the overall set of steps.</p> - - </li> - - <li> + <ol><li><p>If the value of the <var title="">targetOrigin</var> argument is neither a single U+002A + ASTERISK character (*), a single U+002F SOLIDUS character (/), nor an <span>absolute URL</span>, + then throw a <code>SyntaxError</code> exception and abort the overall set of steps.</li> - <p>Let <var title="">new ports</var> be an empty array.</p> + <li><p>Let <var title="">new ports</var> be an empty array.</li> - </li> - - <li> - - <p>Let <var title="">transfer map</var> be an empty association list of - <code>Transferable</code> objects to placeholder objects.</p> - - </li> + <li><p>Let <var title="">transfer map</var> be an empty association list of + <code>Transferable</code> objects to placeholder objects.</li> <li> <p>If the method was invoked with a third argument <var title="">transfer</var>, run these substeps:</p> - <ol><li> - - <p>If any object is listed in <var title="">transfer</var> more than once, or any of the - <code>Transferable</code> objects listed in <var title="">transfer</var> are marked as <span title="concept-Transferable-neutered">neutered</span>, then throw a - <code>DataCloneError</code> exception and abort these steps.</p> - - </li> - - <li> - - <p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, add a - mapping from <var title="">x</var> to a new unique placeholder object created for <var title="">x</var> to <var title="">transfer map</var>, and if <var title="">x</var> is a - <code><a href="#messageport">MessagePort</a></code> object, also append the placeholder object to the <var title="">new - ports</var> array.</p> - - </li> + <ol><li><p>If any object is listed in <var title="">transfer</var> more than once, or any of the + <code>Transferable</code> objects listed in <var title="">transfer</var> are marked as <span title="concept-Transferable-neutered">neutered</span>, then throw a + <code>DataCloneError</code> exception and abort these steps.</li> + + <li><p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, add a + mapping from <var title="">x</var> to a new unique placeholder object created for <var title="">x</var> to <var title="">transfer map</var>, and if <var title="">x</var> is a + <code><a href="#messageport">MessagePort</a></code> object, also append the placeholder object to the <var title="">new + ports</var> array.</li> </ol></li> - <li> - - <p>Let <var title="">message clone</var> be the result of obtaining a <span>structured - clone</span> of the <var title="">message</var> argument, with <var title="">transfer map</var> - as the <i>transfer map</i>. If this throws an exception, then throw that exception and abort - these steps.</p> - - </li> + <li><p>Let <var title="">message clone</var> be the result of obtaining a <span>structured + clone</span> of the <var title="">message</var> argument, with <var title="">transfer map</var> + as the <i>transfer map</i>. If this throws an exception, then throw that exception and abort + these steps.</li> <li> <p>If the method was invoked with a third argument <var title="">transfer</var>, run these substeps:</p> - <ol><li> - - <p>Let <var title="">new owner</var> be the <span>script settings object</span> of the <code>Window</code> object on which the method was - invoked.</p> + <ol><li><p>Let <var title="">new owner</var> be the <span>script settings object</span> of the + <code>Window</code> object on which the method was invoked.</li> - </li> - - <li> - - <p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, obtain a new - object <var title="">y</var> by <span title="transfer a Transferable - object">transferring</span> the object <var title="">x</var> to <var title="">new owner</var>, - and replace the placeholder object that was created for the object <var title="">x</var> by - the new object <var title="">y</var> wherever the placeholder exists (i.e. in <var title="">message clone</var> and in <var title="">new ports</var>).</p> - - </li> + <li><p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, obtain + a new object <var title="">y</var> by <span title="transfer a Transferable + object">transferring</span> the object <var title="">x</var> to <var title="">new + owner</var>, and replace the placeholder object that was created for the object <var title="">x</var> by the new object <var title="">y</var> wherever the placeholder exists + (i.e. in <var title="">message clone</var> and in <var title="">new ports</var>).</li> </ol></li> - <li> - - <p>Make <var title="">new ports</var> into a <span title="dfn-read-only-array">read only</span> - array.</p> - - </li> - - <li> - - <p>Return from the <code title="dom-window-postMessage"><a href="#dom-window-postmessage">postMessage()</a></code> method, but - asynchronously continue running these steps.</p> + <li><p>Make <var title="">new ports</var> into a <span title="dfn-read-only-array">read + only</span> array.</li> - </li> + <li><p>Return from the <code title="dom-window-postMessage"><a href="#dom-window-postmessage">postMessage()</a></code> method, but + asynchronously continue running these steps.</li> <li> - - <p>If the <var title="">targetOrigin</var> argument is a single literal U+002F SOLIDUS character - (/), and the <code>Document</code> of the <code>Window</code> object on which the method was - invoked does not have the <span>same origin</span> as the <span>responsible document</span> specified by the <span>entry settings - object</span>, then abort these steps silently.</p> + <p>If the <var title="">targetOrigin</var> argument is a single literal U+002F SOLIDUS + character (/), and the <code>Document</code> of the <code>Window</code> object on which the + method was invoked does not have the <span>same origin</span> as the <span>responsible + document</span> specified by the <span>entry settings object</span>, then abort these steps + silently.</p> <p>Otherwise, if the <var title="">targetOrigin</var> argument is an <span>absolute URL</span>, and the <code>Document</code> of the <code>Window</code> object on which the method was invoked - does not have the <span>same origin</span> as <var title="">targetOrigin</var>, then abort these - steps silently.</p> + does not have the <span>same origin</span> as <var title="">targetOrigin</var>, then abort + these steps silently.</p> <p>Otherwise, the <var title="">targetOrigin</var> argument is a single literal U+002A ASTERISK character (*), and no origin check is made.</p> </li> - <li> - - - <p>Create a <span title="concept-events-trusted">trusted</span> event that uses the - <code><a href="#messageevent">MessageEvent</a></code> interface, with the event type <code title="event-message">message</code>, which does not bubble, is not cancelable, and has no - default action. The <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> attribute must be - initialized to the value of <var title="">message clone</var>, the <code title="dom-MessageEvent-origin"><a href="#dom-messageevent-origin">origin</a></code> attribute must be initialized to the <span title="Unicode serialization of an origin">Unicode serialization</span> of the - <span>origin</span> specified by the <span>incumbent settings object</span>, the <code title="dom-MessageEvent-source"><a href="#dom-messageevent-source">source</a></code> attribute must be initialized to the - <code>WindowProxy</code> object corresponding to the - <span>global object</span> (a <code>Window</code> object) specified by the - <span>incumbent settings object</span>, - and the <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> attribute must be initialized to the <var title="">new ports</var> array. - - <a href="#refsHTML">[HTML]</a> - - </p> - - - </li> - - <li> - - <p><span>Queue a task</span> to <span title="concept-event-dispatch">dispatch</span> the event - created in the previous step at the <code>Window</code> object on which the method was invoked. - The <span>task source</span> for this <span title="concept-task">task</span> is the <a href="#posted-message-task-source">posted - message task source</a>.</p> + <li><p>Create a <span title="concept-events-trusted">trusted</span> event that uses the + <code><a href="#messageevent">MessageEvent</a></code> interface, with the event type <code title="event-message">message</code>, which does not bubble, is not cancelable, and has no + default action. The <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> attribute must be + initialized to the value of <var title="">message clone</var>, the <code title="dom-MessageEvent-origin"><a href="#dom-messageevent-origin">origin</a></code> attribute must be initialized to the <span title="Unicode serialization of an origin">Unicode serialization</span> of the + <span>origin</span> specified by the <span>incumbent settings object</span>, the <code title="dom-MessageEvent-source"><a href="#dom-messageevent-source">source</a></code> attribute must be initialized to the + <code>WindowProxy</code> object corresponding to the <span>global object</span> (a + <code>Window</code> object) specified by the <span>incumbent settings object</span>, and the + <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> attribute must be initialized to the <var title="">new ports</var> array.</li> + - </li> + <li><p><span>Queue a task</span> to <span title="concept-event-dispatch">dispatch</span> the + event created in the previous step at the <code>Window</code> object on which the method was + invoked. The <span>task source</span> for this <span title="concept-task">task</span> is the + <a href="#posted-message-task-source">posted message task source</a>.</li> </ol></div> @@ -1103,12 +1048,11 @@ <p>When the <dfn id="dom-messagechannel" title="dom-MessageChannel"><code>MessageChannel()</code></dfn> constructor is called, it must run the following algorithm:</p> - <ol><li><p><a href="#create-a-new-messageport-object">Create a new <code>MessagePort</code> object</a> whose <a href="#concept-port-owner" title="concept-port-owner">owner</a> - is the <span>incumbent settings object</span>, and let <var title="">port1</var> be that object.</li> + <ol><li><p><a href="#create-a-new-messageport-object">Create a new <code>MessagePort</code> object</a> whose <a href="#concept-port-owner" title="concept-port-owner">owner</a> is the <span>incumbent settings object</span>, and let + <var title="">port1</var> be that object.</li> - - <li><p><a href="#create-a-new-messageport-object">Create a new <code>MessagePort</code> object</a> whose <a href="#concept-port-owner" title="concept-port-owner">owner</a> - is the <span>incumbent settings object</span>, and let <var title="">port2</var> be that object.</li> + <li><p><a href="#create-a-new-messageport-object">Create a new <code>MessagePort</code> object</a> whose <a href="#concept-port-owner" title="concept-port-owner">owner</a> is the <span>incumbent settings object</span>, and let + <var title="">port2</var> be that object.</li> <li><p><a href="#entangle">Entangle</a> the <var title="">port1</var> and <var title="">port2</var> objects.</li> @@ -1185,29 +1129,24 @@ initially be false, and an <dfn id="concept-port-owner" title="concept-port-owner">owner</dfn>, which is a <span>settings object</span> set when the object is created, as described below.</p> - <p>When a port's <a href="#port-message-queue">port message queue</a> is enabled, the <span>event loop</span> must use it as one of its <span title="task source">task sources</span>. All <span title="concept-task">tasks</span> <span title="queue a task">queued</span> on the <a href="#port-message-queue">port message queue</a> must be associated with the <span>responsible document</span> specified by the port's <a href="#concept-port-owner" title="concept-port-owner">owner</a>.</p> - - <p class="note">If the port's <a href="#concept-port-owner" title="concept-port-owner">owner</a> specifies a <span>responsible document</span> that is <span>fully active</span>, - but the event listeners all have scripts whose <span title="settings object">settings objects</span> - specify <span title="responsible document">responsible documents</span> that are <em>not</em> <span>fully active</span>, then the messages will be - lost.</p> - + <p class="note">If the port's <a href="#concept-port-owner" title="concept-port-owner">owner</a> specifies a + <span>responsible document</span> that is <span>fully active</span>, but the event listeners all + have scripts whose <span title="settings object">settings objects</span> specify <span title="responsible document">responsible documents</span> that are <em>not</em> <span>fully + active</span>, then the messages will be lost.</p> <p>Each <span>event loop</span> has a <span>task source</span> called the <dfn id="unshipped-port-message-queue">unshipped port message queue</dfn>. This is a virtual <span>task source</span>: it must act as if it contained the <span title="concept-task">tasks</span> of each <a href="#port-message-queue">port message queue</a> of each <code><a href="#messageport">MessagePort</a></code> whose <a href="#has-been-shipped">has been shipped</a> flag is false, whose <a href="#port-message-queue">port message queue</a> is enabled, and whose <a href="#concept-port-owner" title="concept-port-owner">owner</a> - specifies that <span>event loop</span> as the <span>responsible event loop</span>, - in the order in which they were added to their respective - <span>task source</span>. When a <span title="concept-task">task</span> would be removed from the - <a href="#unshipped-port-message-queue">unshipped port message queue</a>, it must instead be removed from its <a href="#port-message-queue">port message - queue</a>.</p> + specifies that <span>event loop</span> as the <span>responsible event loop</span>, in the order in + which they were added to their respective <span>task source</span>. When a <span title="concept-task">task</span> would be removed from the <a href="#unshipped-port-message-queue">unshipped port message + queue</a>, it must instead be removed from its <a href="#port-message-queue">port message queue</a>.</p> <p>When a <code><a href="#messageport">MessagePort</a></code>'s <a href="#has-been-shipped">has been shipped</a> flag is false, its <a href="#port-message-queue">port message queue</a> must be ignored for the purposes of the <span>event loop</span>. (The @@ -1219,10 +1158,10 @@ is true, its <a href="#port-message-queue">port message queue</a> acts as a first-class <span>task source</span>, unaffected to any <a href="#unshipped-port-message-queue">unshipped port message queue</a>.</p> - - <p>When the user agent is to <dfn id="create-a-new-messageport-object">create a new <code>MessagePort</code> object</dfn> with a particular - <span>settings object</span> as its <var title="">owner</var>, it must instantiate a new - <code><a href="#messageport">MessagePort</a></code> object, and let its <a href="#concept-port-owner" title="concept-port-owner">owner</a> be <var title="">owner</var>.</p> + <p>When the user agent is to <dfn id="create-a-new-messageport-object">create a new <code>MessagePort</code> object</dfn> with a + particular <span>settings object</span> as its <var title="">owner</var>, it must instantiate a + new <code><a href="#messageport">MessagePort</a></code> object, and let its <a href="#concept-port-owner" title="concept-port-owner">owner</a> be + <var title="">owner</var>.</p> <p>When the user agent is to <dfn id="entangle">entangle</dfn> two <code><a href="#messageport">MessagePort</a></code> objects, it must run the following steps:</p> @@ -1264,12 +1203,9 @@ <li><p>Set <var title="">new port</var>'s <a href="#has-been-shipped">has been shipped</a> flag to true.</li> - - <li><p>Move all the <span title="concept-task">tasks</span> that are to fire <code title="event-message">message</code> events in the <a href="#port-message-queue">port message queue</a> of <var title="">original - port</var> to the <a href="#port-message-queue">port message queue</a> of <var title="">new port</var>, if any, - leaving the <var title="">new port</var>'s <a href="#port-message-queue">port message queue</a> in its initial - disabled state, and reassociating the moved <span title="concept-task">tasks</span> with the <span>responsible document</span> specified by <var title="">new - port</var>'s <a href="#concept-port-owner" title="concept-port-owner">owner</a>.</li> + <li><p>Move all the <span title="concept-task">tasks</span> that are to fire <code title="event-message">message</code> events in the <a href="#port-message-queue">port message queue</a> of <var title="">original port</var> to the <a href="#port-message-queue">port message queue</a> of <var title="">new + port</var>, if any, leaving the <var title="">new port</var>'s <a href="#port-message-queue">port message queue</a> + in its initial disabled state, and reassociating the moved <span title="concept-task">tasks</span> with the <span>responsible document</span> specified by <var title="">new port</var>'s <a href="#concept-port-owner" title="concept-port-owner">owner</a>.</li> <li><p>If <var title="">original port</var> is <a href="#related-to-an-ill-fated-port">related to an ill-fated port</a>, then create a <span title="concept-task">task</span> that <span title="fire a simple event">fires a @@ -1347,10 +1283,8 @@ <li> - <p>If any of the objects in <var title="">transfer</var> are the <var title="">source - port</var>, then throw a - <code>DataCloneError</code> exception and abort these steps.</p> + port</var>, then throw a <code>DataCloneError</code> exception and abort these steps.</p> </li> @@ -1390,25 +1324,24 @@ <ol><li> - - <p>Let <var title="">new owner</var> be the <a href="#concept-port-owner" title="concept-port-owner">owner</a> of <var title="">target port</var>, if there - is a <var title="">target port</var> and <var title="">doomed</var> is false, or else some arbitrary owner. (This <var title="">new + <p>Let <var title="">new owner</var> be the <a href="#concept-port-owner" title="concept-port-owner">owner</a> of + <var title="">target port</var>, if there is a <var title="">target port</var> and <var title="">doomed</var> is false, or else some arbitrary owner. (This <var title="">new owner</var> is used when transferring objects below. If there is no <var title="">target - port</var>, or if the <var title="">target port</var> is one of the objects being <span title="transfer a Transferable - object">transferred</span>, the <code>Transferable</code> objects given in the second argument, if any, are - still <span title="transfer a Transferable object">transferred</span>, but since they are then - discarded, it doesn't matter where they are transferred to.)</p> + port</var>, or if the <var title="">target port</var> is one of the objects being <span title="transfer a Transferable object">transferred</span>, the <code>Transferable</code> + objects given in the second argument, if any, are still <span title="transfer a Transferable + object">transferred</span>, but since they are then discarded, it doesn't matter where they + are transferred to.)</p> </li> <li> - <p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, obtain a new - object <var title="">y</var> by <span title="transfer a Transferable - object">transferring</span> the object <var title="">x</var> to <var title="">new owner</var>, - and replace the placeholder object that was created for the object <var title="">x</var> by - the new object <var title="">y</var> wherever the placeholder exists (i.e. in <var title="">message clone</var> and in <var title="">new ports</var>).</p> + <p>For each object <var title="">x</var> in <var title="">transfer</var> in turn, obtain a + new object <var title="">y</var> by <span title="transfer a Transferable + object">transferring</span> the object <var title="">x</var> to <var title="">new + owner</var>, and replace the placeholder object that was created for the object <var title="">x</var> by the new object <var title="">y</var> wherever the placeholder exists + (i.e. in <var title="">message clone</var> and in <var title="">new ports</var>).</p> </li> @@ -1421,16 +1354,12 @@ </li> - - <li><p>If there is no <var title="">target port</var> (i.e. if <var title="">source port</var> is - not entangled), or if <var title="">doomed</var> is true, then abort these steps.</li> + <li><p>If there is no <var title="">target port</var> (i.e. if <var title="">source port</var> + is not entangled), or if <var title="">doomed</var> is true, then abort these steps.</li> + <li><p>Create an event that uses the <code><a href="#messageevent">MessageEvent</a></code> interface, with the name <code title="event-message">message</code>, which does not bubble, is not cancelable, and has no - default action. - - <a href="#refsHTML">[HTML]</a> - - </li> + default action.</li> <li><p>Let the <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> attribute of the event be initialized to the value of <var title="">message clone</var>.</li> @@ -1468,8 +1397,9 @@ <li><p>Mark <var title="">target port</var> as being a <dfn id="related-to-an-ill-fated-port">related to an ill-fated port</dfn>.</li> - - <li><p>Create a <span title="concept-task">task</span> that <span title="fire a simple event">fires a simple event</span> named <code title="event-error">error</code> at <var title="">target port</var>, and add the <span title="concept-task">task</span> to the <a href="#port-message-queue">port message queue</a> of <var title="">target port</var>. The <span title="concept-task">task</span> must be associated with the <span>responsible document</span> + <li><p>Create a <span title="concept-task">task</span> that <span title="fire a simple + event">fires a simple event</span> named <code title="event-error">error</code> at <var title="">target port</var>, and add the <span title="concept-task">task</span> to the + <a href="#port-message-queue">port message queue</a> of <var title="">target port</var>. The <span title="concept-task">task</span> must be associated with the <span>responsible document</span> specified by <var title="">source port</var>'s <a href="#concept-port-owner" title="concept-port-owner">owner</a>.</li> <li><p>Disentangle the two ports.</li> @@ -1601,11 +1531,9 @@ <div class="impl"> - <p>When a <code><a href="#messageport">MessagePort</a></code> object <var title="">o</var> is entangled, user agents must [30 lines skipped]
Received on Friday, 17 January 2014 08:12:33 UTC