[html5] r3220 - [] (0) Define location.reload().

whatwg at whatwg.org whatwg at whatwg.org
Wed Jun 10 16:46:31 PDT 2009


Author: ianh
Date: 2009-06-10 16:46:29 -0700 (Wed, 10 Jun 2009)
New Revision: 3220

Modified:
   index
   source
Log:
[] (0) Define location.reload().

Modified: index
===================================================================
--- index	2009-06-10 21:50:14 UTC (rev 3219)
+++ index	2009-06-10 23:46:29 UTC (rev 3220)
@@ -51278,7 +51278,7 @@
   session history.</p>
 
   <p>If the <var title="">delta</var> is zero, or if the argument is
-  omitted, then the user agent must act as if the <code title=dom-location-reload>location.reload()</code> method was
+  omitted, then the user agent must act as if the <code title=dom-location-reload><a href=#dom-location-reload>location.reload()</a></code> method was
   called instead.</p>
 
   <p>Otherwise, if the index of the <a href=#current-entry>current entry</a> plus
@@ -51502,7 +51502,7 @@
   readonly attribute DOMString <a href=#dom-location-href title=dom-location-href>href</a>;
   void <a href=#dom-location-assign title=dom-location-assign>assign</a>(in DOMString url);
   void <a href=#dom-location-replace title=dom-location-replace>replace</a>(in DOMString url);
-  void <span title=dom-location-reload>reload</span>();
+  void <a href=#dom-location-reload title=dom-location-reload>reload</a>();
 
   // <a href=#url-decomposition-attributes>URL decomposition attributes</a> <!-- blame brendan for these "innovative" names -->
            attribute DOMString <a href=#dom-location-protocol title=dom-location-protocol>protocol</a>;
@@ -51543,7 +51543,7 @@
 
    </dd>
 
-   <dt><var title="">location</var> . <code title=dom-location-reload>reload</code>()</dt>
+   <dt><var title="">location</var> . <code title=dom-location-reload><a href=#dom-location-reload>reload</a></code>()</dt>
 
    <dd>
 
@@ -51607,18 +51607,38 @@
   successful, then the user agent must instead throw a
   <code><a href=#syntax_err>SYNTAX_ERR</a></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 id=dom-location-reload 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><dt>If the currently executing <a href=#concept-task title=concept-task>task</a> is the dispatch of a <code title=event-resize>resize</code> event in response to the user
+   resizing the <a href=#browsing-context>browsing context</a></dt>
 
-user reload must be equivalent to .reload()
--->
+   <dd><p>Repaint the <a href=#browsing-context>browsing context</a> and abort these
+   steps.</dd> <!-- this theoretically would have no effect but in
+   practice can be useful to work around rendering bugs. -->
 
+   <dt>Otherwise</dt>
+
+   <dd><p><a href=#navigate>Navigate</a> the <a href=#browsing-context>browsing context</a> to
+   the <a href="#the-document's-current-address">the document's current address</a> with
+   <a href=#replacement-enabled>replacement enabled</a>. The <a href=#source-browsing-context>source browsing
+   context</a> must be the <a href=#browsing-context>browsing context</a> being
+   navigated.</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 <a href=#navigate>navigate</a>
+  the <a href=#browsing-context>browsing context</a> to the same resource as
+  <code>Document</code>, with <a href=#replacement-enabled>replacement enabled</a>. 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><a href=#location>Location</a></code> interface also has the complement of

Modified: source
===================================================================
--- source	2009-06-10 21:50:14 UTC (rev 3219)
+++ source	2009-06-10 23:46:29 UTC (rev 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




More information about the Commit-Watchers mailing list