Skip to content

Commit

Permalink
Add definition for "weak map"
Browse files Browse the repository at this point in the history
  • Loading branch information
whimboo committed Mar 7, 2024
1 parent b7d581e commit 81cf5a8
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4256,15 +4256,24 @@ <h2>Elements</h2>
representing a handle to a DOM node in a specific
WebDriver <a>session</a>.

<p>A <dfn>weak map</dfn> is a <a data-cite=infra>map</a> in which keys are held weakly
i.e. items are removed if the key object is garbaged collected, and presence
in the map does not prevent garbage collection. This acts as an alternative
to defining properties directly on the key objects.

<p class=note>Unlike the ECMAScript <a data-lt="ecmascript type">WeakMap</a>,
a <a>weak map</a> can participate in the full set of operations available for
a <a>Map</a>.

<p>A WebDriver <a>session</a> has a <dfn>browsing context group node
map</dfn>, which is a weak map between a <a>browsing context group</a>
map</dfn>, which is a <a>weak map</a> between a <a>browsing context group</a>
and a <a>node id map</a>.

<p>A <dfn>node id map</dfn> is weak map between nodes and their
<p>A <dfn>node id map</dfn> is <a>weak map</a> between nodes and their
corresponding <a>WebDriver node id</a>.

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

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

0 comments on commit 81cf5a8

Please sign in to comment.