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 definition for "weak map" #1713

Merged
merged 1 commit into from
Mar 7, 2024
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
14 changes: 11 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4065,15 +4065,23 @@ <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 [=infra/map=] 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 [=WeakMap=] type, 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