Skip to content

Commit 81cf5a8

Browse files
committed
Add definition for "weak map"
1 parent b7d581e commit 81cf5a8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

index.html

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4256,15 +4256,24 @@ <h2>Elements</h2>
42564256
representing a handle to a DOM node in a specific
42574257
WebDriver <a>session</a>.
42584258

4259+
<p>A <dfn>weak map</dfn> is a <a data-cite=infra>map</a> in which keys are held weakly
4260+
i.e. items are removed if the key object is garbaged collected, and presence
4261+
in the map does not prevent garbage collection. This acts as an alternative
4262+
to defining properties directly on the key objects.
4263+
4264+
<p class=note>Unlike the ECMAScript <a data-lt="ecmascript type">WeakMap</a>,
4265+
a <a>weak map</a> can participate in the full set of operations available for
4266+
a <a>Map</a>.
4267+
42594268
<p>A WebDriver <a>session</a> has a <dfn>browsing context group node
4260-
map</dfn>, which is a weak map between a <a>browsing context group</a>
4269+
map</dfn>, which is a <a>weak map</a> between a <a>browsing context group</a>
42614270
and a <a>node id map</a>.
42624271

4263-
<p>A <dfn>node id map</dfn> is weak map between nodes and their
4272+
<p>A <dfn>node id map</dfn> is <a>weak map</a> between nodes and their
42644273
corresponding <a>WebDriver node id</a>.
42654274

42664275
<p>A WebDriver <a>session</a> has a <dfn>navigable seen nodes map</dfn>
4267-
which is a weak map between a [=navigable=] and a set.
4276+
which is a <a>weak map</a> between a [=navigable=] and a set.
42684277

42694278
<p>To <dfn>get a node</dfn> given <var>session</var>,
42704279
<var>browsing context</var>, and <var>reference</var>:

0 commit comments

Comments
 (0)