Skip to content

Commit

Permalink
Add deserialization steps for web frame an web window
Browse files Browse the repository at this point in the history
  • Loading branch information
whimboo committed May 15, 2023
1 parent a65f9fb commit 82120f6
Showing 1 changed file with 77 additions and 3 deletions.
80 changes: 77 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3211,12 +3211,28 @@ <h2>Contexts</h2>
identifies it. This must be a <a>String</a> and must not be
"<code>current</code>".

<p>The <dfn>web window identifier</dfn>
is the string constant "<code>window-fcc6-11e5-b4f8-330a88ab9d7f</code>".
<p>A <dfn data-lt="web frames">web frame</dfn>
is an abstraction used to identify an <a>iframe</a>
when it is transported via the <a href="#protocol">protocol</a>,
between <a>remote</a>- and <a>local</a> ends.

<p>The <dfn>web frame identifier</dfn>
is the string constant "<code>frame-075b-4da1-b6ba-e579c2d3230a</code>".

<p>An ECMAScript <a>Object</a> <dfn>represents a web frame</dfn>
if it has a <a>web frame identifier</a> <a>own property</a>.

<p>A <dfn data-lt="web windows">web window</dfn>
is an abstraction used to identify a <a>window</a>
when it is transported via the <a href="#protocol">protocol</a>,
between <a>remote</a>- and <a>local</a> ends.

<p>The <dfn>web window identifier</dfn>
is the string constant "<code>window-fcc6-11e5-b4f8-330a88ab9d7f</code>".

<p>An ECMAScript <a>Object</a> <dfn>represents a web window</dfn>
if it has a <a>web window identifier</a> <a>own property</a>.

<p>The <dfn><code>WindowProxy</code> reference object</dfn>
with <a><code>WindowProxy</code></a> object <var>window</var> is
given by:
Expand All @@ -3236,6 +3252,54 @@ <h2>Contexts</h2>
</dl>
</ol>

<p>To <dfn>deserialize a web frame</dfn> by a
JSON <a>Object</a> <var>object</var> that <a>represents a web
frame</a>:

<ol>
<li><p>If <var>object</var> has no <a>own property</a> <a>web frame identifier</a>,
return <a>error</a> with <a>error code</a> <a>invalid argument</a>.

<li><p>Let <var>reference</var> be the result of
<a data-lt="getting a property">getting</a>
the <a>web frame identifier</a> property
from <var>object</var>.

<li><p>Let <var>browsing context</var> be the result
of running any implementation-specific steps for
<a>trying</a> to get a known browsing context
with <var>reference</var>.

<li><p>If <var>browsing context</var> is null or a <a>top-level browsing context</a>,
return <a>error</a> with <a>error code</a> <a>no such frame</a>.

<li><p>Return <a>success</a> with data <var>browsing context</var>'s associated window.
</ol>

<p>To <dfn>deserialize a web window</dfn> by a
JSON <a>Object</a> <var>object</var> that <a>represents a web
window</a>:

<ol>
<li><p>If <var>object</var> has no <a>own property</a> <a>web window identifier</a>,
return <a>error</a> with <a>error code</a> <a>invalid argument</a>.

<li><p>Let <var>reference</var> be the result of
<a data-lt="getting a property">getting</a>
the <a>web window identifier</a> property
from <var>object</var>.

<li><p>Let <var>browsing context</var> be the result
of running any implementation-specific steps for
<a>trying</a> to get a known browsing context
with <var>reference</var>.

<li><p>If <var>browsing context</var> is null or not a <a>top-level browsing context</a>,
return <a>error</a> with <a>error code</a> <a>no such window</a>.

<li><p>Return <a>success</a> with data <var>browsing context</var>'s associated window.
</ol>

<p>When required to <dfn>set the current browsing context</dfn> given
a <var>context</var>, an implementation must follow the following
steps:
Expand Down Expand Up @@ -6516,7 +6580,17 @@ <h3>Executing Script</h3>
<dd><p>Return the <a data-lt="deserialize a shadow root">deserialized</a>
<a>shadow root</a> of <var>value</var>.

<dt>instance of <a>Array</a>
<dt><a>Object</a> that <a>represents a web frame</a>
<dd>
<p>Return the <a data-lt="deserialize a web frame">deserialized</a>
<a>web frame</a> of <var>value</var>.

<dt><a>Object</a> that <a>represents a web window</a>
<dd>
<p>Return the <a data-lt="deserialize a web window">deserialized</a>
<a>web window</a> of <var>value</var>.

<dt>instance of <a>Array</a>
<dt>instance of <a>Object</a>
<dd><p>Return the result of running the <a>clone an object</a> algorithm
with arguments <var>value</var> and <var>seen</var>,
Expand Down

0 comments on commit 82120f6

Please sign in to comment.