Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deserialization steps for web frame and web window #1738

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 74 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 a <a>frame</a> or <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,53 @@ <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 <a>browsing context</a> whose
<a>window handle</a> is <var>reference</var>, or null if no such
<a>browsing context</a> exists.

<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 <a>browsing context</a> whose
<a>window handle</a> is <var>reference</var>, or null if no such
<a>browsing context</a> exists.

<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 @@ -4053,7 +4116,7 @@ <h2>Elements</h2>
<p>A <dfn data-lt="web elements">web element</dfn>
is an abstraction used to identify an <a>element</a>
when it is transported via the <a href="#protocol">protocol</a>,
between <a>remote</a>- and <a>local</a> ends.
between <a>remote</a> and <a>local</a> ends.

<p>The <dfn>web element identifier</dfn> is the string constant
"<code>element-6066-11e4-a52e-4f735466cecf</code>".
Expand Down Expand Up @@ -6516,6 +6579,14 @@ <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><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
Expand Down
Loading