Skip to content

Commit

Permalink
Improve terminology for scroll restoration mode
Browse files Browse the repository at this point in the history
- Make it clear that ```history.scrollRestoration``` reflects the
  "current entry of the session history"
- Make sure the default value is defined for the concept not the
  attribute
- Fix minor link issues in example description
  • Loading branch information
majido committed Oct 29, 2015
1 parent ed411e9 commit 9a825ec
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -80417,7 +80417,7 @@ interface <dfn>History</dfn> {

<dd>

<p>The <span>scroll restoration mode</span> of the current entry in the <span>joint session history</span>.</p>
<p>The <span>scroll restoration mode</span> of the current entry in the <span>session history</span>.</p>

</dd>

Expand Down Expand Up @@ -80526,8 +80526,8 @@ interface <dfn>History</dfn> {

<p>The <dfn><code data-x="dom-history-scroll-restoration">scrollRestoration</code></dfn> attribute
of the History interface, on getting, must return the <span>scroll restoration mode</span> of the
<span>current entry of the joint session history</span>. On setting, the <span>scroll restoration
mode</span> of the <span>current entry of the joint session history</span> must be set to the new
current entry in the <span>session history</span>. On setting, the <span>scroll restoration mode
</span> of the current entry in the <span>session history</span> must be set to the new
value. <span>Scroll restoration mode</span> may be one of the following:</p>
<dl>
<dt>"<dfn><code subdfn data-x="dom-ScrollRestoration-auto">auto</code></dfn>"</dt>
Expand All @@ -80537,7 +80537,8 @@ interface <dfn>History</dfn> {
to do so automatically</dd>
</dl>

<p>Initially, its value must be "<code data-x="dom-ScrollRestoration-auto">auto</code>".</p>
<p>If unspecified, the <span>scroll restoration mode</span> of a new entry must be set to
"<code data-x="dom-ScrollRestoration-auto">auto</code>".</p>

<p>The <dfn><code data-x="dom-history-state">state</code></dfn> attribute of the
<code>History</code> interface must return the last value it was set to by the user agent.
Expand Down Expand Up @@ -80745,8 +80746,8 @@ interface <dfn>History</dfn> {
<li><p>Add a <span>state object</span> entry to the session history, after the <span>current
entry</span>, with <var>cloned data</var> as the <span>state object</span>, the given
<var>title</var> as the title, <var>new URL</var> as the <span>URL</span>
of the entry, and the <span>scroll restoration mode</span> of the <span>current entry of the
joint session history</span> as the scroll restoration mode.</p></li>
of the entry, and the <span>scroll restoration mode</span> of the current entry in the
<span>session history</span> as the scroll restoration mode.</p></li>

<li><p>Update the <span>current entry</span> to be this newly added entry.</p></li>

Expand Down Expand Up @@ -80896,10 +80897,10 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
</div>

<div class="example">
<p>Most applications want to use the same scroll restoration mode value for all of their history
entries. To achieve this they should set the <code data-x="dom-history-scroll-restoration">scrollRestoration</code>
attribute as soon as possible (e.g., in first script tag in the document's
<code>&lt;head&gt;</code>) to ensure that any entry added to the history session gets the desired
<p>Most applications want to use the same <span>scroll restoration mode</span> value for all of
their history entries. To achieve this they should set the <code data-x="dom-history-scroll-restoration">scrollRestoration</code>
attribute as soon as possible (e.g., in the first <code>script</code> element in the document's
<code>head</code> element) to ensure that any entry added to the history session gets the desired
scroll restoration mode.</p>

<pre>&lt;head&gt;
Expand Down

0 comments on commit 9a825ec

Please sign in to comment.