Skip to content

Commit f8e293f

Browse files
committed
Add history.index
Closes whatwg#2710.
1 parent c441d70 commit f8e293f

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

source

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80288,6 +80288,7 @@ interface <dfn>BarProp</dfn> {
8028880288

8028980289
[Exposed=Window]
8029080290
interface <dfn>History</dfn> {
80291+
readonly attribute unsigned long <span data-x="dom-history-index">index</span>;
8029180292
readonly attribute unsigned long <span data-x="dom-history-length">length</span>;
8029280293
attribute <span>ScrollRestoration</span> <span data-x="dom-history-scroll-restoration">scrollRestoration</span>;
8029380294
readonly attribute any <span data-x="dom-history-state">state</span>;
@@ -80300,7 +80301,16 @@ interface <dfn>History</dfn> {
8030080301

8030180302
<dl class="domintro">
8030280303

80303-
<dt><var>window</var> . <code subdfn data-x="dom-history">history</code> . <code subdfn data-x="dom-history-length">length</code></dt>
80304+
<dt><var>window</var> . <code subdfn data-x="dom-history">history</code> . <code subdfn data-x="dom-history-index">index</code></dt>
80305+
80306+
<dd>
80307+
80308+
<p>Returns the index of the <span>current entry of the joint session history</span> within the
80309+
<span>joint session history</span>.</p>
80310+
80311+
</dd>
80312+
80313+
<dt><var>window</var> . <code data-x="dom-history">history</code> . <code subdfn data-x="dom-history-length">length</code></dt>
8030480314

8030580315
<dd>
8030680316

@@ -80407,6 +80417,13 @@ interface <dfn>History</dfn> {
8040780417

8040880418
<div w-nodev>
8040980419

80420+
<p>The <dfn><code data-x="dom-history-index">length</code></dfn> attribute of the
80421+
<code>History</code> interface, on getting, must return the index of the <span>current entry of
80422+
the joint session history</span> within the <span>top-level browsing context</span>'s <span>joint
80423+
session history</span>. If this <code>History</code> object is associated with a
80424+
<code>Document</code> that is not <span>fully active</span>, getting must instead throw a
80425+
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p>
80426+
8041080427
<p>The <dfn><code data-x="dom-history-length">length</code></dfn> attribute of the
8041180428
<code>History</code> interface, on getting, must return the number of entries in the
8041280429
<span>top-level browsing context</span>'s <span>joint session history</span>. If this

0 commit comments

Comments
 (0)