Skip to content

Commit

Permalink
Add history.index
Browse files Browse the repository at this point in the history
Closes whatwg#2710.
  • Loading branch information
domenic authored and Alice Boxhall committed Jan 7, 2019
1 parent 75e9e1c commit 9db2ea3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -80303,6 +80303,7 @@ interface <dfn>BarProp</dfn> {

[Exposed=Window]
interface <dfn>History</dfn> {
readonly attribute unsigned long <span data-x="dom-history-index">index</span>;
readonly attribute unsigned long <span data-x="dom-history-length">length</span>;
attribute <span>ScrollRestoration</span> <span data-x="dom-history-scroll-restoration">scrollRestoration</span>;
readonly attribute any <span data-x="dom-history-state">state</span>;
Expand All @@ -80315,7 +80316,16 @@ interface <dfn>History</dfn> {

<dl class="domintro">

<dt><var>window</var> . <code subdfn data-x="dom-history">history</code> . <code subdfn data-x="dom-history-length">length</code></dt>
<dt><var>window</var> . <code subdfn data-x="dom-history">history</code> . <code subdfn data-x="dom-history-index">index</code></dt>

<dd>

<p>Returns the index of the <span>current entry of the joint session history</span> within the
<span>joint session history</span>.</p>

</dd>

<dt><var>window</var> . <code data-x="dom-history">history</code> . <code subdfn data-x="dom-history-length">length</code></dt>

<dd>

Expand Down Expand Up @@ -80422,6 +80432,13 @@ interface <dfn>History</dfn> {

<div w-nodev>

<p>The <dfn><code data-x="dom-history-index">length</code></dfn> attribute of the
<code>History</code> interface, on getting, must return the index of the <span>current entry of
the joint session history</span> within the <span>top-level browsing context</span>'s <span>joint
session history</span>. If this <code>History</code> object is associated with a
<code>Document</code> that is not <span>fully active</span>, getting must instead throw a
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p>

<p>The <dfn><code data-x="dom-history-length">length</code></dfn> attribute of the
<code>History</code> interface, on getting, must return the number of entries in the
<span>top-level browsing context</span>'s <span>joint session history</span>. If this
Expand Down

0 comments on commit 9db2ea3

Please sign in to comment.