Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e32a6f8

Browse files
authored
Tie BarProp object lifetime to the Window object
Also describe what happens when the browsing context is discarded. Tests: web-platform-tests/wpt#15815. Follow-up: whatwg#4431. Fixes whatwg#2579.
1 parent dafd8b1 commit e32a6f8

File tree

1 file changed

+16
-26
lines changed

1 file changed

+16
-26
lines changed

source

+16-26
Original file line numberDiff line numberDiff line change
@@ -78443,8 +78443,7 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
7844378443
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-personalbar">personalbar</span>;
7844478444
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-scrollbars">scrollbars</span>;
7844578445
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-statusbar">statusbar</span>;
78446-
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-toolbar">toolbar</span>;<!--
78447-
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-directories">directories</span>; // legacy (Gecko-only) -->
78446+
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-toolbar">toolbar</span>;
7844878447
attribute DOMString <span data-x="dom-window-status">status</span>;
7844978448
void <span data-x="dom-window-close">close</span>();
7845078449
readonly attribute boolean <span data-x="dom-window-closed">closed</span>;
@@ -79203,7 +79202,6 @@ interface <dfn>BarProp</dfn> {
7920379202
};</code></pre>
7920479203

7920579204
<dl class="domintro">
79206-
7920779205
<dt><var>window</var> . <code subdfn data-x="dom-window-locationbar">locationbar</code> . <code subdfn data-x="dom-BarProp-visible">visible</code></dt>
7920879206
<dd>
7920979207
<p>Returns true if the location bar is visible; otherwise, returns false.</p>
@@ -79215,7 +79213,6 @@ interface <dfn>BarProp</dfn> {
7921579213
</dd>
7921679214

7921779215
<dt><var>window</var> . <code subdfn data-x="dom-window-personalbar">personalbar</code> . <code data-x="dom-BarProp-visible">visible</code></dt>
79218-
<!--<dt><var>window</var> . <code subdfn data-x="dom-window-directories">directories</code> . <code data-x="dom-BarProp-visible">visible</code></dt>-->
7921979216
<dd>
7922079217
<p>Returns true if the personal bar is visible; otherwise, returns false.</p>
7922179218
</dd>
@@ -79234,45 +79231,45 @@ interface <dfn>BarProp</dfn> {
7923479231
<dd>
7923579232
<p>Returns true if the toolbar is visible; otherwise, returns false.</p>
7923679233
</dd>
79237-
7923879234
</dl>
7923979235

7924079236
<div w-nodev>
7924179237

79242-
<p>The <dfn data-x="dom-BarProp-visible">visible</dfn> attribute, on getting, must return either
79243-
true or a value determined by the user agent to most accurately represent the visibility state of
79244-
the user interface element that the object represents, as described below.</p>
79238+
<p>The <dfn data-x="dom-BarProp-visible">visible</dfn> attribute's getter must run these
79239+
steps:</p>
7924579240

79246-
<p>The following <code>BarProp</code> objects exist for each <code>Document</code> object in a
79247-
<span>browsing context</span>. Some of the user interface elements represented by these objects
79248-
might have no equivalent in some user agents; for those user agents, except when otherwise
79249-
specified, the object must act as if it was present and visible (i.e. its <code
79250-
data-x="dom-BarProp-visible">visible</code> attribute must return true).</p>
79241+
<ol>
79242+
<li><p>If this <code>BarProp</code> object's <span>relevant global object</span>'s <span
79243+
data-x="window bc">browsing context</span> is null, then return false.</p></li>
7925179244

79252-
<dl>
79245+
<li><p>If the user agent does not have a user interface element that the object represents, as
79246+
described below, then return true.</p></li>
7925379247

79254-
<dt><dfn>The location bar <code>BarProp</code> object</dfn></dt>
79248+
<li><p>Return true or a value determined by the user agent to most accurately represent the
79249+
visibility state of the user interface element that the object represents, as described
79250+
below.</p></li>
79251+
</ol>
7925579252

79253+
<p>The following <code>BarProp</code> objects must exist for each <code>Window</code> object:</p>
79254+
79255+
<dl>
79256+
<dt><dfn>The location bar <code>BarProp</code> object</dfn></dt>
7925679257
<dd>Represents the user interface element that contains a control that displays the
7925779258
<span>URL</span> of the <span>active document</span>, or some similar interface concept.</dd>
7925879259

7925979260
<dt><dfn>The menu bar <code>BarProp</code> object</dfn></dt>
79260-
7926179261
<dd>Represents the user interface element that contains a list of commands in menu form, or some
7926279262
similar interface concept.</dd>
7926379263

7926479264
<dt><dfn>The personal bar <code>BarProp</code> object</dfn></dt>
79265-
7926679265
<dd>Represents the user interface element that contains links to the user's favorite pages, or
7926779266
some similar interface concept.</dd>
7926879267

7926979268
<dt><dfn>The scrollbar <code>BarProp</code> object</dfn></dt>
79270-
7927179269
<dd>Represents the user interface element that contains a scrolling mechanism, or some similar
7927279270
interface concept.</dd>
7927379271

7927479272
<dt><dfn>The status bar <code>BarProp</code> object</dfn></dt>
79275-
7927679273
<dd>Represents a user interface element found immediately below or after the document, as
7927779274
appropriate for the user's media, which typically provides information about ongoing network
7927879275
activity or information about elements that the user's pointing device is current indicating. If
@@ -79281,14 +79278,12 @@ interface <dfn>BarProp</dfn> {
7928179278
data-x="dom-BarProp-visible">visible</code> attribute may return false).</dd>
7928279279

7928379280
<dt><dfn>The toolbar <code>BarProp</code> object</dfn></dt>
79284-
7928579281
<dd>Represents the user interface element found immediately above or before the document, as
7928679282
appropriate for the user's media, which typically provides <span>session history</span> traversal
7928779283
controls (back and forward buttons, reload buttons, etc). If the user agent has no such user
7928879284
interface element, then the object may act as if the corresponding user interface element was
7928979285
absent (i.e. its <code data-x="dom-BarProp-visible">visible</code> attribute may return
7929079286
false).</dd>
79291-
7929279287
</dl>
7929379288

7929479289
<p>The <dfn><code data-x="dom-window-locationbar">locationbar</code></dfn> attribute must return
@@ -79309,11 +79304,6 @@ interface <dfn>BarProp</dfn> {
7930979304
<p>The <dfn><code data-x="dom-window-toolbar">toolbar</code></dfn> attribute must return <span>the
7931079305
toolbar <code>BarProp</code> object</span>.</p>
7931179306

79312-
<!--
79313-
<p>For legacy reasons, the <dfn><code data-x="dom-window-directories">directories</code></dfn>
79314-
attribute must also return <span>the personal bar <code>BarProp</code> object</span>.</p>
79315-
-->
79316-
7931779307
<hr>
7931879308

7931979309
<p>For historical reasons, the <dfn><code data-x="dom-window-status">status</code></dfn> attribute

0 commit comments

Comments
 (0)