Skip to content
Permalink
Browse files

[giow] (3) Update Location's members to point to the right document.

Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@7513 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Nov 20, 2012
1 parent 06700b9 commit 22030a86cdcb237400cf8e029dc62e7d8382bd7d
Showing with 97 additions and 123 deletions.
  1. +30 −39 complete.html
  2. +30 −39 index
  3. +37 −45 source

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 19 November 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 20 November 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>

</div>

<p><code><a href=#location>Location</a></code> objects provide a representation of <a href="#the-document's-address" title="the document's address">their document's address</a>, and
allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing
context</a>'s session history to be changed, by adding or
replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code>
object.</p>
<p><code><a href=#location>Location</a></code> objects provide a representation of <a href="#the-document's-address" title="the document's
address">the address</a> of the <a href=#active-document>active document</a> of their <code><a href=#document>Document</a></code>'s
<a href=#browsing-context>browsing context</a>, and allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing
context</a>'s session history to be changed, by adding or replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code> object.</p>

<pre class=idl>interface <dfn id=location>Location</dfn> {
stringifier attribute DOMString <a href=#dom-location-href title=dom-location-href>href</a>;

</dl><div class=impl>

<p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn>
attribute must return <a href="#the-document's-address" title="the document's address">the
address</a> of the associated <code><a href=#document>Document</a></code> object, as an
<a href=#absolute-url>absolute URL</a>.</p>
<p>The <i>relevant <code><a href=#document>Document</a></code></i> is the <code><a href=#location>Location</a></code> object's associated <code><a href=#document>Document</a></code> object's
<a href=#browsing-context>browsing context</a>'s <a href=#active-document>active document</a>.</p>

<p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn> attribute must return <a href="#the-document's-address" title="the document's address">the address</a> of the <i>relevant <code><a href=#document>Document</a></code></i>, as
an <a href=#absolute-url>absolute URL</a>.</p>

<p>On setting, if the <code><a href=#location>Location</a></code> object's associated
<code><a href=#document>Document</a></code> object has <a href=#completely-loaded>completely loaded</a>,
then the user agent must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> method had been called
with the new value as its argument. Otherwise, the user agent must
act as if the <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code>
method had been called with the new value as its argument.</p>
<!--DONAV location.href, defined in terms of the paragraphs below-->
<p>On setting, if the <code><a href=#location>Location</a></code> object's <i>relevant <code><a href=#document>Document</a></code></i> has
<a href=#completely-loaded>completely loaded</a>, then the user agent must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> method had been called with the new value as its
argument. Otherwise, the user agent must act as if the <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> method had been called with the new value as its
argument.</p> <!--DONAV location.href, defined in terms of the paragraphs below-->

<p>When the <dfn id=dom-location-assign title=dom-location-assign><code>assign(<var title="">url</var>)</code></dfn> method is invoked, the UA must
<a href=#resolve-a-url title="resolve a url">resolve</a> the argument, relative to

<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/141 -->

</dl><p>When a user requests that the current page of a <a href=#browsing-context>browsing
context</a> be reloaded through a user interface element, the
user agent should <a href=#navigate>navigate</a><!--DONAV user reload--> the
<a href=#browsing-context>browsing context</a> to the same resource as
<code><a href=#document>Document</a></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. If <a href=#browsing-context>browsing
context</a>'s <a href=#active-document>active document</a>'s <a href=#reload-override-flag>reload
override flag</a> is set, then the user agent may instead perform
<a href=#an-overridden-reload>an overridden reload</a> rather than the navigation
</dl><p>When a user requests that the <a href=#active-document>active document</a> of a <a href=#browsing-context>browsing context</a>
be reloaded through a user interface element, the user agent should <a href=#navigate>navigate</a><!--DONAV
user reload--> the <a href=#browsing-context>browsing context</a> to the same resource as that
<code><a href=#document>Document</a></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. If <a href=#browsing-context>browsing
context</a>'s <a href=#active-document>active document</a>'s <a href=#reload-override-flag>reload override flag</a> is set, then the
user agent may instead perform <a href=#an-overridden-reload>an overridden reload</a> rather than the navigation
described in this paragraph.</p>

</div>

<p>The <code><a href=#location>Location</a></code> interface also has the complement of
<a href=#url-decomposition-idl-attributes>URL decomposition IDL 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 <a href=#url-decomposition-idl-attributes>URL
decomposition IDL attributes</a>, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <a href="#the-document's-address" title="the
document's address">the address</a> of the associated
<code><a href=#document>Document</a></code> object, as an <a href=#absolute-url>absolute URL</a> (same
as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute), and
the <a href=#concept-uda-setter title=concept-uda-setter>common setter action</a>
being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output
value.</span></p> <!--TOPIC:HTML-->
<p>The <code><a href=#location>Location</a></code> interface also has the complement of <a href=#url-decomposition-idl-attributes>URL decomposition IDL
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 <a href=#url-decomposition-idl-attributes>URL decomposition IDL attributes</a>, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <a href="#the-document's-address" title="the document's address">the
address</a> of the <i>relevant <code><a href=#document>Document</a></code></i>, as an <a href=#absolute-url>absolute URL</a> (same
as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute), and the <a href=#concept-uda-setter title=concept-uda-setter>common setter action</a> being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output value.</span></p>



<!--ADD-TOPIC:Security-->
</div>


<!--TOPIC:HTML-->
<h3 id=browsing-the-web><span class=secno>6.6 </span>Browsing the Web</h3>

<div class=impl>
69 index

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 19 November 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 20 November 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>

</div>

<p><code><a href=#location>Location</a></code> objects provide a representation of <a href="#the-document's-address" title="the document's address">their document's address</a>, and
allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing
context</a>'s session history to be changed, by adding or
replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code>
object.</p>
<p><code><a href=#location>Location</a></code> objects provide a representation of <a href="#the-document's-address" title="the document's
address">the address</a> of the <a href=#active-document>active document</a> of their <code><a href=#document>Document</a></code>'s
<a href=#browsing-context>browsing context</a>, and allow the <a href=#current-entry>current entry</a> of the <a href=#browsing-context>browsing
context</a>'s session history to be changed, by adding or replacing entries in the <code title=dom-history><a href=#dom-history>history</a></code> object.</p>

<pre class=idl>interface <dfn id=location>Location</dfn> {
stringifier attribute DOMString <a href=#dom-location-href title=dom-location-href>href</a>;

</dl><div class=impl>

<p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn>
attribute must return <a href="#the-document's-address" title="the document's address">the
address</a> of the associated <code><a href=#document>Document</a></code> object, as an
<a href=#absolute-url>absolute URL</a>.</p>
<p>The <i>relevant <code><a href=#document>Document</a></code></i> is the <code><a href=#location>Location</a></code> object's associated <code><a href=#document>Document</a></code> object's
<a href=#browsing-context>browsing context</a>'s <a href=#active-document>active document</a>.</p>

<p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn> attribute must return <a href="#the-document's-address" title="the document's address">the address</a> of the <i>relevant <code><a href=#document>Document</a></code></i>, as
an <a href=#absolute-url>absolute URL</a>.</p>

<p>On setting, if the <code><a href=#location>Location</a></code> object's associated
<code><a href=#document>Document</a></code> object has <a href=#completely-loaded>completely loaded</a>,
then the user agent must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> method had been called
with the new value as its argument. Otherwise, the user agent must
act as if the <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code>
method had been called with the new value as its argument.</p>
<!--DONAV location.href, defined in terms of the paragraphs below-->
<p>On setting, if the <code><a href=#location>Location</a></code> object's <i>relevant <code><a href=#document>Document</a></code></i> has
<a href=#completely-loaded>completely loaded</a>, then the user agent must act as if the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> method had been called with the new value as its
argument. Otherwise, the user agent must act as if the <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> method had been called with the new value as its
argument.</p> <!--DONAV location.href, defined in terms of the paragraphs below-->

<p>When the <dfn id=dom-location-assign title=dom-location-assign><code>assign(<var title="">url</var>)</code></dfn> method is invoked, the UA must
<a href=#resolve-a-url title="resolve a url">resolve</a> the argument, relative to

<!-- http://software.hixie.ch/utilities/js/live-dom-viewer/saved/141 -->

</dl><p>When a user requests that the current page of a <a href=#browsing-context>browsing
context</a> be reloaded through a user interface element, the
user agent should <a href=#navigate>navigate</a><!--DONAV user reload--> the
<a href=#browsing-context>browsing context</a> to the same resource as
<code><a href=#document>Document</a></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. If <a href=#browsing-context>browsing
context</a>'s <a href=#active-document>active document</a>'s <a href=#reload-override-flag>reload
override flag</a> is set, then the user agent may instead perform
<a href=#an-overridden-reload>an overridden reload</a> rather than the navigation
</dl><p>When a user requests that the <a href=#active-document>active document</a> of a <a href=#browsing-context>browsing context</a>
be reloaded through a user interface element, the user agent should <a href=#navigate>navigate</a><!--DONAV
user reload--> the <a href=#browsing-context>browsing context</a> to the same resource as that
<code><a href=#document>Document</a></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. If <a href=#browsing-context>browsing
context</a>'s <a href=#active-document>active document</a>'s <a href=#reload-override-flag>reload override flag</a> is set, then the
user agent may instead perform <a href=#an-overridden-reload>an overridden reload</a> rather than the navigation
described in this paragraph.</p>

</div>

<p>The <code><a href=#location>Location</a></code> interface also has the complement of
<a href=#url-decomposition-idl-attributes>URL decomposition IDL 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 <a href=#url-decomposition-idl-attributes>URL
decomposition IDL attributes</a>, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <a href="#the-document's-address" title="the
document's address">the address</a> of the associated
<code><a href=#document>Document</a></code> object, as an <a href=#absolute-url>absolute URL</a> (same
as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute), and
the <a href=#concept-uda-setter title=concept-uda-setter>common setter action</a>
being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output
value.</span></p> <!--TOPIC:HTML-->
<p>The <code><a href=#location>Location</a></code> interface also has the complement of <a href=#url-decomposition-idl-attributes>URL decomposition IDL
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 <a href=#url-decomposition-idl-attributes>URL decomposition IDL attributes</a>, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <a href="#the-document's-address" title="the document's address">the
address</a> of the <i>relevant <code><a href=#document>Document</a></code></i>, as an <a href=#absolute-url>absolute URL</a> (same
as the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute), and the <a href=#concept-uda-setter title=concept-uda-setter>common setter action</a> being the same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code> attribute to the new output value.</span></p>



<!--ADD-TOPIC:Security-->
</div>


<!--TOPIC:HTML-->
<h3 id=browsing-the-web><span class=secno>6.6 </span>Browsing the Web</h3>

<div class=impl>

0 comments on commit 22030a8

Please sign in to comment.
You can’t perform that action at this time.