Skip to content

Commit 624221c

Browse files
jgrahamAutomatedTester
authored andcommitted
Use "[reference] object" in place of "JSON Serialization".
We have historically called a JS object that represents some remote end object X in the wire protocol "the JSON serialization of X". But that terminology is confusing; a JSON serialization is presumably a string or bytes rather than an object. So instead use "the X object" or, for objects that represent handles to DOM objects, "the X reference object" to talk about the object we consturct before serialization.
1 parent 3439b69 commit 624221c

File tree

1 file changed

+79
-61
lines changed

1 file changed

+79
-61
lines changed

index.html

Lines changed: 79 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ <h3>Processing model</h3>
538538
at the time when the error occurred.
539539

540540
<p>Let <var>body</var> be a new JSON <a>Object</a>
541-
initialised with the following properties:
541+
initialized with the following properties:
542542

543543
<dl>
544544
<dt>"<code>error</code>"
@@ -2396,7 +2396,7 @@ <h3 id=new-session><dfn data-lt="new sessions|creating a new session">New Sessio
23962396

23972397
<li><p>Append <var>session</var> to <a>active sessions</a>.
23982398

2399-
<li><p>Let <var>body</var> be a JSON <a>Object</a> initialised with:
2399+
<li><p>Let <var>body</var> be a JSON <a>Object</a> initialized with:
24002400

24012401
<dl>
24022402
<dt>"<code>sessionId</code>"
@@ -2625,18 +2625,19 @@ <h2>Timeouts</h2>
26252625
<sup></sup> Informative.
26262626

26272627
<p>
2628-
The <a>timeouts configuration</a>’s <a>JSON serialization</a>
2629-
is expressed as a JSON <a>Object</a> with the following properties:
2628+
The <dfn>timeouts object</dfn> for a <a>timeouts
2629+
configuration</a> <var>timeouts</a> is an <a>object</a> initalized
2630+
with the following properties:
26302631

26312632
<dl>
26322633
<dt>"<code>script</code>"
2633-
<dd><a>Script timeout</a>’s value, if set, or its default value.
2634+
<dd><var>timeouts</var>' <a>script timeout</a> value, if set, or its default value.
26342635

26352636
<dt>"<code>pageLoad</code>"
2636-
<dd><a>Page load timeout</a>’s value, if set, or its default value.
2637+
<dd><var>timouts</var>' <a>page load timeout</a>’s value, if set, or its default value.
26372638

26382639
<dt>"<code>implicit</code>"
2639-
<dd><a>Implicit wait timeout</a>’s value, if set, or its default value.
2640+
<dd><var>timeouts</var>' <a>implicit wait timeout</a>’s value, if set, or its default value.
26402641
</dl>
26412642

26422643
<p>
@@ -2719,9 +2720,14 @@ <h3><dfn>Get Timeouts</dfn></h3>
27192720
</table>
27202721

27212722
<p>
2722-
The <a>remote end step</a> is to return <a>success</a>
2723-
with data being the <a>JSON serialization</a>
2724-
of the <a>active session</a>’s <a>timeouts configuration</a>.
2723+
The <a>remote end step</a> are:
2724+
2725+
<ol>
2726+
<li><p>Let <var>timeouts</var> be the <a>timeouts object</a> for
2727+
<a>session</a>’s <a>timeouts configuration</a>
2728+
2729+
<li><p>Return <a>success</a> with data <var>timeouts</var>.
2730+
</ol>
27252731
</section> <!-- /Get Timeouts -->
27262732

27272733

@@ -3207,9 +3213,9 @@ <h2>Contexts</h2>
32073213
<p>The <dfn>web frame identifier</dfn>
32083214
is the string constant "<code>frame-075b-4da1-b6ba-e579c2d3230a</code>".
32093215

3210-
<p>The <dfn>JSON serialization of the <code>WindowProxy</code> object</dfn>
3211-
is the JSON <a>Object</a> obtained by applying the following algorithm
3212-
to the given <a><code>WindowProxy</code></a> object <var>window</var>:
3216+
<p>The <dfn><code>WindowProxy</code> reference object</dfn>
3217+
with <a><code>WindowProxy</code></a> object <var>window</var> is
3218+
given by:
32133219

32143220
<ol>
32153221
<li><p>Let <var>identifier</var> be the <a>web window identifier</a>
@@ -3222,8 +3228,7 @@ <h2>Contexts</h2>
32223228

32233229
<dl>
32243230
<dt><var>identifier</var>
3225-
<dd><p>Associated <a>window handle</a>
3226-
of the <var>window</var>’s <a>browsing context</a>.
3231+
<dd><p>Associated <a>window handle</a> of the <var>window</var>’s <a>browsing context</a>.
32273232
</dl>
32283233
</ol>
32293234

@@ -3697,20 +3702,23 @@ <h3>Resizing and positioning windows</h3>
36973702
is defined as a dictionary of the <a>screenX</a>, <a>screenY</a>,
36983703
<a>outerWidth</a> and <a>outerHeight</a> attributes
36993704
of the <a><code>WindowProxy</code></a>.
3700-
Its <dfn data-lt="json serialization of window rect">JSON representation</dfn> is the following:
3705+
3706+
<p>The <dfn>WindowRect object</dfn> for
3707+
a <a>WindowProxy</a>, <var>window</var> is a <a>object</a> initalised
3708+
with the following properties:
37013709

37023710
<dl>
37033711
<dt>"<code>x</code>"
3704-
<dd><p><a><code>WindowProxy</code></a>’s <a>screenX</a> attribute.
3712+
<dd><p><var>window</var>’s <a>screenX</a> attribute.
37053713

37063714
<dt>"<code>y</code>"
3707-
<dd><p><a><code>WindowProxy</code></a>’s <a>screenY</a> attribute.
3715+
<dd><p><var>window</var>’s <a>screenY</a> attribute.
37083716

37093717
<dt>"<code>width</code>"
3710-
<dd><p><a><code>WindowProxy</code></a>’s <a>outerWidth</a> attribute.
3718+
<dd><p><var>windows</var>’s <a>outerWidth</a> attribute.
37113719

37123720
<dt>"<code>height</code>"
3713-
<dd><p><a><code>WindowProxy</code></a>’s <a>outerHeight</a> attribute.
3721+
<dd><p><var>window</var>’s <a>outerHeight</a> attribute.
37143722
</dl>
37153723

37163724
<p>To <dfn>maximize the window</dfn>,
@@ -3779,10 +3787,8 @@ <h4><dfn>Get Window Rect</dfn></h4>
37793787

37803788
<li><p><a>Handle any user prompts</a> and return its value if it is an <a>error</a>.
37813789

3782-
<li><p>Return <a>success</a>
3783-
with the <a data-lt="json serialization of window rect">JSON serialization</a>
3784-
of the <a>current top-level browsing context</a>’s
3785-
<a>window rect</a>.
3790+
<li><p>Return <a>success</a> with data set to the <a>WindowRect
3791+
object</a> for the <a>current top-level browsing context</a>.
37863792
</ol>
37873793
</section> <!-- /Get Window Rect -->
37883794

@@ -3906,9 +3912,8 @@ <h4><dfn>Set Window Rect</dfn></h4>
39063912
</aside>
39073913
</ol>
39083914

3909-
<li><p>Return <a>success</a>
3910-
with the <a data-lt="json serialization of window rect">JSON serialization</a>
3911-
of the <a>current top-level browsing context</a>’s <a>window rect</a>.
3915+
<li><p>Return <a>success</a> with data set to the <a>WindowRect
3916+
object</a> for the <a>current top-level browsing context</a>.
39123917
</ol>
39133918
</section> <!-- /Set Window Rect -->
39143919

@@ -3952,10 +3957,9 @@ <h4><dfn>Maximize Window</dfn></h4>
39523957
<li><p><a>Maximize the window</a>
39533958
of the <a>current top-level browsing context</a>.
39543959

3955-
<li><p>Return <a>success</a>
3956-
with the <a data-lt="json serialization of window rect">JSON serialization</a>
3957-
of the <a>current top-level browsing context</a>’s
3958-
<a>window rect</a>.
3960+
<li><p>Return <a>success</a> with data set to the <a>WindowRect
3961+
object</a> for the <a>current top-level browsing
3962+
context</a>.
39593963
</ol>
39603964
</section> <!-- /Maximize Window -->
39613965

@@ -3995,10 +3999,9 @@ <h4><dfn>Minimize Window</dfn></h4>
39953999

39964000
<li><p><a>Iconify the window</a>.
39974001

3998-
<li><p>Return <a>success</a>
3999-
with the <a data-lt="json serialization of window rect">JSON serialization</a>
4000-
of the <a>current top-level browsing context</a>’s
4001-
<a>window rect</a>.
4002+
<li><p>Return <a>success</a> with data set to the <a>WindowRect
4003+
object</a> for the <a>current top-level browsing
4004+
context</a>.
40024005
</ol>
40034006
</section> <!-- /Minimize Window -->
40044007

@@ -4033,10 +4036,9 @@ <h4><dfn>Fullscreen Window</dfn></h4>
40334036
with the <a>current top-level browsing context</a>’s
40344037
<a>active document</a>’s <a>document element</a>.
40354038

4036-
<li><p>Return <a>success</a>
4037-
with the <a data-lt="json serialization of window rect">JSON serialization</a>
4038-
of the <a>current top-level browsing context</a>’s
4039-
<a>window rect</a>.
4039+
<li><p>Return <a>success</a> with data set to the <a>WindowRect
4040+
object</a> for the <a>current top-level browsing
4041+
context</a>.
40404042
</ol>
40414043
</section> <!-- /Fullscreen Window -->
40424044

@@ -4094,8 +4096,8 @@ <h2>Elements</h2>
40944096
<li>Return <a>success</a> with <var>element</var>.
40954097
</ol>
40964098

4097-
<p>To <dfn data-lt="create an element">create a web element reference</dfn>
4098-
for an <a><var>element</var></a>:
4099+
<p>To <dfn>get or create a web element reference</dfn>
4100+
with <a><var>element</var></a>:
40994101

41004102
<ol>
41014103
<li><p>For each <var>known element</var>
@@ -4113,9 +4115,18 @@ <h2>Elements</h2>
41134115
<var>element</var>’s <a>web element reference</a>.
41144116
</ol>
41154117

4116-
<p>The <dfn>JSON serialization of an element</dfn>
4117-
is a JSON <a>Object</a> where the <a>web element identifier</a> key
4118-
is mapped to the <a>element</a>’s <a>web element reference</a>.
4118+
<p>The <dfn>web element reference object</dfn> for <var>element</var>
4119+
is given by:
4120+
4121+
<ol>
4122+
<li><p>Let <var>identifier</var> be the <a>web element identifier</a>.
4123+
4124+
<li><p>Let <var>reference</var> be the result of <a>get or create a
4125+
web element reference</a> given <var>element</var>.
4126+
4127+
<li><p>Return a JSON <a>Object</a> initialized with a property with
4128+
name <var>identifier</var> and value <var>reference</var>.
4129+
</ol>
41194130

41204131
<p>When required to <dfn>deserialize a web element</dfn>
41214132
by a JSON <a>Object</a> <var>object</var> that <a>represents a web element</a>:
@@ -4385,8 +4396,8 @@ <h3 id=shadow-root>Shadow Roots</h3>
43854396
<li>Return <a>success</a> with <var>shadow</var>.
43864397
</ol>
43874398

4388-
<p>To <dfn data-lt="create a shadow root|a new shadow root reference">create a shadow root reference</dfn>
4389-
for a <a><var>shadow root</var></a>:
4399+
<p>To <dfn>get or create a shadow root reference</dfn>
4400+
with <a><var>shadow root</var></a>:
43904401

43914402
<ol>
43924403
<li><p>For each <var>known shadow root</var>
@@ -4404,9 +4415,18 @@ <h3 id=shadow-root>Shadow Roots</h3>
44044415
<var>shadow</var>’s <a>shadow root reference</a>.
44054416
</ol>
44064417

4407-
<p>The <dfn>JSON serialization of a shadow root</dfn>
4408-
is a JSON <a>Object</a> where the <a>shadow root identifier</a> key
4409-
is mapped to the <a>shadow root</a>’s <a>shadow root reference</a>.
4418+
<p>The <dfn>shadow root reference object</dfn> for <var>shadow
4419+
root</var> is given by:
4420+
4421+
<ol>
4422+
<li><p>Let <var>identifier</var> be the <a>shadow root identifier</a>.
4423+
4424+
<li><p>Let <var>reference</var> be the result of <a>get or create a
4425+
shadow root reference</a> given <var>shadow root</var>.
4426+
4427+
<li><p>Return a JSON <a>Object</a> initialized with a property with
4428+
name <var>identifier</var> and value <var>reference</var>.
4429+
</ol>
44104430

44114431
<p>When required to <dfn>deserialize a shadow root</dfn>
44124432
by a JSON <a>Object</a> <var>object</var> that <a>represents a shadow root</a>:
@@ -4446,8 +4466,6 @@ <h3 id=element-retrieval>Retrieval</h3>
44464466
Element retrieval searches are performed
44474467
using pre-order traversal of the document’s nodes
44484468
that match the provided selector’s expression.
4449-
Elements are <a data-lt="JSON serialization of an element">serialized</a>
4450-
and returned as <a>web elements</a>.
44514469

44524470
<p>When required to <dfn>find</dfn> with arguments
44534471
<var>start node</var>, <var>using</var> and <var>value</var>,
@@ -4478,8 +4496,8 @@ <h3 id=element-retrieval>Retrieval</h3>
44784496
<li><p>Let <var>result</var> be an empty JSON <a>List</a>.
44794497

44804498
<li><p>For each <var>element</var> in <var>elements returned</var>,
4481-
append the <a data-lt="JSON serialization of an element">serialization</a>
4482-
of <var>element</var> to <var>result</var>.
4499+
append the <a>web element reference object</a> for <var>element</var>,
4500+
to <var>result</var>.
44834501

44844502
<li><p>Return <a>success</a> with data <var>result</var>.
44854503
</ol>
@@ -5011,7 +5029,8 @@ <h4><dfn>Get Active Element</dfn></h4>
50115029
of the <a>current browsing context</a>’s <a>document element</a>.
50125030

50135031
<li><p>If <var>active element</var> is a non-null <a>element</a>,
5014-
return <a>success</a> with its <a data-lt="JSON serialization of an element">JSON serialization</a>.
5032+
return <a>success</a> with data set to <a>web element reference
5033+
object</a> for <var>active element</var>.
50155034

50165035
<p>Otherwise, return <a>error</a> with <a>error code</a> <a>no such element</a>.
50175036
</ol>
@@ -5480,7 +5499,7 @@ <h4><dfn>Get Element Rect</dfn></h4>
54805499
<li><p>Let <var>rect</var> be <var>element</var>’s
54815500
<a>bounding rectangle</a>.
54825501

5483-
<li><p>Let <var>body</var> be a new JSON <a>Object</a> initialised with:
5502+
<li><p>Let <var>body</var> be a new JSON <a>Object</a> initialized with:
54845503

54855504
<dl>
54865505
<dt>"<code>x</code>"
@@ -6451,19 +6470,18 @@ <h3>Executing Script</h3>
64516470
<dd><p>If the <var>element</var> <a>is stale</a>,
64526471
return <a>error</a> with <a>error code</a> <a>stale element reference</a>.
64536472

6454-
<p>Otherwise return <a>success</a>
6455-
with the <a data-lt="JSON serialization of an element">JSON serialization</a>
6456-
of <var>value</var>.
6473+
<p>Otherwise return <a>success</a> with data set to the <var>web
6474+
element reference object</var> for <var>value</var>.
64576475

64586476
<dt>a <a><code>WindowProxy</code></a> object
64596477
<dd><p>If the associated <a>browsing context</a>
64606478
of the <a><code>WindowProxy</code></a> object
64616479
in <var>value</var> has been <a>discarded</a>,
64626480
return <a>error</a> with <a>error code</a> <a>stale element reference</a>.
64636481

6464-
<p>Otherwise return <a>success</a>
6465-
with the <a data-lt="JSON serialization of the WindowProxy object">JSON serialization</a>
6466-
of <var>value</var>.
6482+
<p>Otherwise return <a>success</a> with data set
6483+
to <a><code>WindowProxy</code> reference object</a>
6484+
for <var>value</var>.
64676485

64686486
<dt>has an <a>own property</a> named "<code>toJSON</code>" that is
64696487
a <a>Function</a>

0 commit comments

Comments
 (0)