Skip to content

Commit

Permalink
[giow] (0) Make BroadcastChannel support structured clones
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=25415
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@8590 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 30, 2014
1 parent 87994a6 commit d017866
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
11 changes: 8 additions & 3 deletions complete.html
Expand Up @@ -83442,7 +83442,7 @@ <h3 id=broadcasting-to-other-browsing-contexts><span class=secno>9.6 </span><dfn
<pre class=idl>[<a href=#dom-broadcastchannel title=dom-BroadcastChannel>Constructor</a>(DOMString channel)]
interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-broadcastchannel-name title=dom-BroadcastChannel-name>name</a>;
void <a href=#dom-broadcastchannel-postmessage title=dom-BroadcastChannel-postMessage>postMessage</a>(DOMString message);
void <a href=#dom-broadcastchannel-postmessage title=dom-BroadcastChannel-postMessage>postMessage</a>(any message);
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-broadcastchannel-onmessage title=handler-BroadcastChannel-onmessage>onmessage</a>;
};</pre>

Expand All @@ -83466,7 +83466,7 @@ <h3 id=broadcasting-to-other-browsing-contexts><span class=secno>9.6 </span><dfn

<dd>

<p>Sends the given message to other <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects set up for this channel.</p>
<p>Sends the given message to other <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.</p>

</dd>

Expand All @@ -83493,6 +83493,9 @@ <h3 id=broadcasting-to-other-browsing-contexts><span class=secno>9.6 </span><dfn
<li><p>Let <var title="">source channel</var> be <var title="">source</var>'s
<a href=#channel-name>channel name</a>.</p>

<li><p>Let <var title="">cloned message</var> be a <a href=#structured-clone>structured clone</a> of the <var title="">message</var> argument. If this throws an exception, then rethrow that exception and
abort these steps.</li>

<li>

<p>Let <var title="">destinations</var> be a list of <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects that
Expand Down Expand Up @@ -83548,7 +83551,9 @@ <h3 id=broadcasting-to-other-browsing-contexts><span class=secno>9.6 </span><dfn
<ol><!--CLEANUP--><li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type
<code title=event-message><a href=#event-message>message</a></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 the <var title="">message</var> argument, and the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
initialized to a <a href=#structured-clone>structured clone</a> of <var title="">cloned message</var><!-- it's
a clone of /cloned message/, not /message/, so that there's no risk of running scripts again
-->, and the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
<a href=#origin>origin</a> specified by <var title="">source settings</var>. This event is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>.</li>

<li><p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the event at the
Expand Down
11 changes: 8 additions & 3 deletions index
Expand Up @@ -83442,7 +83442,7 @@ callback <dfn id=portcollectioncallback>PortCollectionCallback</dfn> = void (<a
<pre class=idl>[<a href=#dom-broadcastchannel title=dom-BroadcastChannel>Constructor</a>(DOMString channel)]
interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget>EventTarget</a> {
readonly attribute DOMString <a href=#dom-broadcastchannel-name title=dom-BroadcastChannel-name>name</a>;
void <a href=#dom-broadcastchannel-postmessage title=dom-BroadcastChannel-postMessage>postMessage</a>(DOMString message);
void <a href=#dom-broadcastchannel-postmessage title=dom-BroadcastChannel-postMessage>postMessage</a>(any message);
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-broadcastchannel-onmessage title=handler-BroadcastChannel-onmessage>onmessage</a>;
};</pre>

Expand All @@ -83466,7 +83466,7 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget

<dd>

<p>Sends the given message to other <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects set up for this channel.</p>
<p>Sends the given message to other <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.</p>

</dd>

Expand All @@ -83493,6 +83493,9 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget
<li><p>Let <var title="">source channel</var> be <var title="">source</var>'s
<a href=#channel-name>channel name</a>.</p>

<li><p>Let <var title="">cloned message</var> be a <a href=#structured-clone>structured clone</a> of the <var title="">message</var> argument. If this throws an exception, then rethrow that exception and
abort these steps.</li>

<li>

<p>Let <var title="">destinations</var> be a list of <code><a href=#broadcastchannel>BroadcastChannel</a></code> objects that
Expand Down Expand Up @@ -83548,7 +83551,9 @@ interface <dfn id=broadcastchannel>BroadcastChannel</dfn> : <a href=#eventtarget
<ol><!--CLEANUP--><li><p>Create an event that uses the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event type
<code title=event-message><a href=#event-message>message</a></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 the <var title="">message</var> argument, and the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
initialized to a <a href=#structured-clone>structured clone</a> of <var title="">cloned message</var><!-- it's
a clone of /cloned message/, not /message/, so that there's no risk of running scripts again
-->, and the <code title=dom-MessageEvent-origin><a href=#dom-messageevent-origin>origin</a></code> attribute must be initialized to the <a href=#unicode-serialization-of-an-origin title="Unicode serialization of an origin">Unicode serialization</a> of the
<a href=#origin>origin</a> specified by <var title="">source settings</var>. This event is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>.</li>

<li><p><a href=#concept-event-dispatch title=concept-event-dispatch>Dispatch</a> the event at the
Expand Down
12 changes: 9 additions & 3 deletions source
Expand Up @@ -93710,7 +93710,7 @@ callback <dfn>PortCollectionCallback</dfn> = void (<span>MessagePort</span> port
<pre class="idl">[<span data-x="dom-BroadcastChannel">Constructor</span>(DOMString channel)]
interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {
readonly attribute DOMString <span data-x="dom-BroadcastChannel-name">name</span>;
void <span data-x="dom-BroadcastChannel-postMessage">postMessage</span>(DOMString message);
void <span data-x="dom-BroadcastChannel-postMessage">postMessage</span>(any message);
attribute <span>EventHandler</span> <span data-x="handler-BroadcastChannel-onmessage">onmessage</span>;
};</pre>

Expand All @@ -93736,7 +93736,7 @@ interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {

<dd>

<p>Sends the given message to other <code>BroadcastChannel</code> objects set up for this channel.</p>
<p>Sends the given message to other <code>BroadcastChannel</code> objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.</p>

</dd>

Expand Down Expand Up @@ -93767,6 +93767,10 @@ interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {
<li><p>Let <var data-x="">source channel</var> be <var data-x="">source</var>'s
<span>channel name</span>.</p>

<li><p>Let <var data-x="">cloned message</var> be a <span>structured clone</span> of the <var
data-x="">message</var> argument. If this throws an exception, then rethrow that exception and
abort these steps.</p></li>

<li>

<p>Let <var data-x="">destinations</var> be a list of <code>BroadcastChannel</code> objects that
Expand Down Expand Up @@ -93834,7 +93838,9 @@ interface <dfn>BroadcastChannel</dfn> : <span>EventTarget</span> {
<li><p>Create an event that uses the <code>MessageEvent</code> interface, with the event type
<code data-x="event-message">message</code>, which does not bubble, is not cancelable, and has
no default action. The <code data-x="dom-MessageEvent-data">data</code> attribute must be
initialized to the value of the <var data-x="">message</var> argument, and the <code
initialized to a <span>structured clone</span> of <var data-x="">cloned message</var><!-- it's
a clone of /cloned message/, not /message/, so that there's no risk of running scripts again
-->, and the <code
data-x="dom-MessageEvent-origin">origin</code> attribute must be initialized to the <span
data-x="Unicode serialization of an origin">Unicode serialization</span> of the
<span>origin</span> specified by <var data-x="">source settings</var>. This event is not <span
Expand Down

0 comments on commit d017866

Please sign in to comment.