Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) Define location.reload().
git-svn-id: http://svn.whatwg.org/webapps@3220 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 10, 2009
1 parent b3dbe15 commit 1ae9d91
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 21 deletions.
44 changes: 32 additions & 12 deletions index
Expand Up @@ -51278,7 +51278,7 @@ style/default.css</pre>
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
Expand Down Expand Up @@ -51502,7 +51502,7 @@ style/default.css</pre>
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>;
Expand Down Expand Up @@ -51543,7 +51543,7 @@ style/default.css</pre>

</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>

Expand Down Expand Up @@ -51607,17 +51607,37 @@ style/default.css</pre>
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>

Expand Down
45 changes: 36 additions & 9 deletions source
Expand Up @@ -58924,17 +58924,44 @@ style/default.css</pre>
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>

Expand Down

0 comments on commit 1ae9d91

Please sign in to comment.