Short URL: http://html5.org/r/3220
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 3220 | Define location.reload(). | 2009-06-10 23:46 |
Index: source =================================================================== --- source (revision 3219) +++ source (revision 3220) @@ -58924,18 +58924,45 @@ 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> <p>The <code>Location</code> interface also has the complement of