Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[] (0) Define location.reload().
git-svn-id: http://svn.whatwg.org/webapps@3220 340c8d12-0b0e-0410-8428-c7bf67bfef74
- Loading branch information
successful, then the user agent must instead throw a | ||
<code>SYNTAX_ERR</code> exception.</p> | ||
|
||
<!--XXX | ||
<dfn title="dom-location-reload"><code>reload()</code></dfn> | ||
reload during resize event: | ||
redisplay the current page (without reloading it). This | ||
theoretically would have no effect but in practice can be useful to | ||
work around rendering bugs. | ||
<p>When the <dfn | ||
title="dom-location-reload"><code>reload()</code></dfn> method is | ||
invoked, the user agent must run the appropriate steps from the | ||
following list:</p> | ||
|
||
reload on shared Document updates all of them | ||
<dl class="switch"> | ||
|
||
user reload must be equivalent to .reload() | ||
--> | ||
<dt>If the currently executing <span | ||
title="concept-task">task</span> is the dispatch of a <code | ||
title="event-resize">resize</code> event in response to the user | ||
resizing the <span>browsing context</span></dt> | ||
|
||
<dd><p>Repaint the <span>browsing context</span> and abort these | ||
steps.</p></dd> <!-- this theoretically would have no effect but in | ||
practice can be useful to work around rendering bugs. --> | ||
|
||
<dt>Otherwise</dt> | ||
|
||
<dd><p><span>Navigate</span> the <span>browsing context</span> to | ||
the <span>the document's current address</span> with | ||
<span>replacement enabled</span>. The <span>source browsing | ||
context</span> must be the <span>browsing context</span> being | ||
navigated.</p></dd> <!-- it appears that document.reload() always | ||
uses GET and does not, e.g., re-POST. --> | ||
|
||
<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/141 --> | ||
|
||
</dl> | ||
|
||
<p>When a user requests that the current page be reloaded through a | ||
user interface element, the user agent should <span>navigate</span> | ||
the <span>browsing context</span> to the same resource as | ||
<code>Document</code>, with <span>replacement enabled</span>. In the | ||
case of non-idempotent methods (e.g. HTTP POST), the user agent | ||
should prompt the user to confirm the operation first, since | ||
otherwise transactions (e.g. purchases or database modifications) | ||
could be repeated. User agents may allow the user to explicitly | ||
override any caches when reloading.</p> | ||
|
||
</div> | ||
|