Skip to content

Commit

Permalink
Make it explicit that user agents can ignore replaceState/pushState
Browse files Browse the repository at this point in the history
Fixes whatwg#982. The "a user agent could ignore calls" is moved from the
non-normative implementation notes to the normative algorithm, and the
implementation notes are updated with a pointer to this.
  • Loading branch information
domenic authored and jungkees committed Apr 8, 2016
1 parent cbce275 commit d44318f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -79457,6 +79457,10 @@ interface <dfn>History</dfn> {
<li><p>If this <code>History</code> object is associated with a <code>Document</code> that is
not <span>fully active</span>, throw a <code>SecurityError</code> exception.</p></li>

<li><p>Optionally, abort these steps. (For example, the user agent might disallow calls to these
methods that are invoked on a timer, or from event listeners that are not triggered in response
to a clear user action, or that are invoked in rapid succession.)</p></li>

<li><p>Let <var>targetRealm</var> be this <code>History</code> object's <span>relevant settings
object</span>'s <span data-x="environment settings object's realm">Realm</span>.</p></li>

Expand Down Expand Up @@ -79727,10 +79731,10 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
two "back" commands, one that goes back to the previous state, and one that jumps straight back to
the previous page.</p>

<p>In addition, a user agent could ignore calls to <code
data-x="dom-history-pushState">pushState()</code> that are invoked on a timer, or from event
listeners that are not triggered in response to a clear user action, or that are invoked in rapid
succession.</p>
<p>For both <code data-x="dom-history-pushState">pushState()</code> and <code
data-x="dom-history-replaceState">replaceState()</code>, user agents are encouraged to prevent
abuse of these APIs via too-frequent calls or over-large state objects. As detailed above, the
algorithm explicitly allows user agents to ignore any such calls when appropriate.</p>
<!--REMOVE-TOPIC:Security-->

</div>
Expand Down

0 comments on commit d44318f

Please sign in to comment.