W3C home > Mailing lists > Public > public-html-commits@w3.org > June 2009

html5/spec Overview.html,1.2370,1.2371

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 10 Jun 2009 23:46:38 +0000
To: public-html-commits@w3.org
Message-Id: <E1MEXV8-0004IZ-Bd@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv16505

Modified Files:
Log Message:
Define location.reload(). (whatwg r3220)

Index: Overview.html
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2370
retrieving revision 1.2371
diff -u -d -r1.2370 -r1.2371
--- Overview.html	10 Jun 2009 21:50:20 -0000	1.2370
+++ Overview.html	10 Jun 2009 23:46:35 -0000	1.2371
@@ -46152,7 +46152,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
@@ -46355,7 +46355,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>;
@@ -46394,7 +46394,7 @@
-   <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>
@@ -46458,17 +46458,37 @@
   successful, then the user agent must instead throw a
   <code><a href="#syntax_err">SYNTAX_ERR</a></code> exception.</p>
-  <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
   <a href="#url-decomposition-attributes">URL decomposition attributes</a>, <dfn id="dom-location-protocol" title="dom-location-protocol"><code>protocol</code></dfn>, <dfn id="dom-location-host" title="dom-location-host"><code>host</code></dfn>, <dfn id="dom-location-port" title="dom-location-port"><code>port</code></dfn>, <dfn id="dom-location-hostname" title="dom-location-hostname"><code>hostname</code></dfn>, <dfn id="dom-location-pathname" title="dom-location-pathname"><code>pathname</code></dfn>, <dfn id="dom-location-search" title="dom-location-search"><code>search</code></dfn>, and <dfn id="dom-location-hash" title="dom-location-hash"><code>hash</code></dfn>. <span class="impl">These must follow the rules given for URL decomposition
Received on Wednesday, 10 June 2009 23:46:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 23:46:46 GMT