spec/Overview.html 1.1585 2413 location.resolveURL() for resolving rela

location.resolveURL() for resolving relative URLs (for sending to
workers, in particular) (credit: js) (whatwg r2413)

replace(url)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#dom-location-replace
Status of this document
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#status-of-this-document
5.8.4.1 Security
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#security-3
A vocabulary and associated APIs for HTML and XHTML
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#a-vocabulary-and-associated-apis-for-html-and-xhtml
protocol
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#dom-location-protocol
Location
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#location
Editor's Draft 18 November 2008
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#editor-s-draft-date-zzz-9-june-2008
href
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#dom-location-href
resolveURL(url)
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1585.html#dom-location-resolveurl

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1584&r2=1.1585&f=h
http://html5.org/tools/web-apps-tracker?from=2412&to=2413

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1584
retrieving revision 1.1585
diff -u -d -r1.1584 -r1.1585
--- Overview.html 17 Nov 2008 22:38:17 -0000 1.1584
+++ Overview.html 18 Nov 2008 03:40:57 -0000 1.1585
@@ -8,7 +8,7 @@
    <p><a href=http://www.w3.org/><img alt=W3C height=48 src=http://www.w3.org/Icons/w3c_home width=72></a></p>
    <h1>HTML 5</h1>
    <h2 class="no-num no-toc" id=a-vocabulary-and-associated-apis-for-html-and-xhtml>A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->17 November 2008</h2>
+   <h2 class="no-num no-toc" id=editor-s-draft-date-zzz-9-june-2008><!-- "W3C Working Draft" --> Editor's Draft <!--ZZZ-->18 November 2008</h2>
    <dl><!-- ZZZ: update the month/day
     <dt>This Version:</dt>
     <dd><a href="http://www.w3.org/TR/2008/WD-html5-20080610/">http://www.w3.org/TR/2008/WD-html5-20080610/</a></dd>
@@ -97,7 +97,7 @@
   specification's progress along the W3C Recommendation
   track.
   <!--ZZZ:-->
-  This specification is the 17 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
+  This specification is the 18 November 2008 <!--ZZZ "Working Draft"-->Editor's Draft.
   <!--:ZZZ-->
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>This specification is also being produced by the <a href=http://www.whatwg.org/>WHATWG</a>. The two specifications are
   identical from the table of contents onwards.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- context and rationale (required) --><p>This specification is intended to replace (be a new version of)
@@ -29383,7 +29383,7 @@
   void <a href=#dom-location-replace title=dom-location-replace>replace</a>(in DOMString url);
   void <span title=dom-location-reload>reload</span>();
 
-    // <a href=#url-decomposition-attributes>URL decomposition attributes</a> <!-- blame brendan for these "innovative" names -->
+  // <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>;
            attribute DOMString <a href=#dom-location-host title=dom-location-host>host</a>;
            attribute DOMString <a href=#dom-location-hostname title=dom-location-hostname>hostname</a>;
@@ -29391,6 +29391,9 @@
            attribute DOMString <a href=#dom-location-pathname title=dom-location-pathname>pathname</a>;
            attribute DOMString <a href=#dom-location-search title=dom-location-search>search</a>;
            attribute DOMString <a href=#dom-location-hash title=dom-location-hash>hash</a>;
+
+  // resolving relative URLs
+  DOMString <a href=#dom-location-resolveurl title=dom-location-resolveURL>resolveURL</a>(in DOMString url);
 };</pre><p>The <dfn id=dom-location-href title=dom-location-href><code>href</code></dfn>
   attribute must return <span title="the document's address">the
   address</span><!-- XXXDOCURL --> of the page represented by the
@@ -29419,14 +29422,7 @@
   specified <var title="">url</var> with <a href=#replacement-enabled>replacement
   enabled</a>.<p>Navigation for the <code title=dom-location-assign><a href=#dom-location-assign>assign()</a></code> and <code title=dom-location-replace><a href=#dom-location-replace>replace()</a></code> methods must be done
   with the <a href=#script-browsing-context>script browsing context</a> of the script that
-  invoked the method as the <a href=#source-browsing-context>source browsing context</a>.<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>. These must follow
-  the rules given for URL decomposition attributes, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <span title="the
-  document's address">the address</span><!-- XXXDOCURL --> of the page
-  represented by the associated <code>Document</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.</p><!--
+  invoked the method as the <a href=#source-browsing-context>source browsing context</a>.</p><!--XXX
   <dfn title="dom-location-reload"><code>reload()</code></dfn>
   reload during resize event:
   redisplay the current page (without reloading it). This
@@ -29436,7 +29432,18 @@
 reload on shared Document updates all of them
 
 user reload must be equivalent to .reload()
---><h5 id=security-3><span class=secno>5.8.4.1 </span>Security</h5><p>User agents must raise a <a href=#security-exception>security exception</a> whenever
+--><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>. These must follow
+  the rules given for URL decomposition attributes, with the <a href=#concept-uda-input title=concept-uda-input>input</a> being <span title="the
+  document's address">the address</span><!-- XXXDOCURL --> of the page
+  represented by the associated <code>Document</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.</p><hr><p>The <dfn id=dom-location-resolveurl title=dom-location-resolveURL><code>resolveURL(<var title="">url</var>)</code></dfn> method must <a href=#resolve-a-url title="resolve a
+  url">resolve</a> its <var title="">url</var> argument, and if
+  that succeeds, return the resulting <a href=#absolute-url>absolute URL</a>. If it
+  fails, it must throw a <code>SYNTAX_ERR</code> exception
+  instead.<h5 id=security-3><span class=secno>5.8.4.1 </span>Security</h5><p>User agents must raise a <a href=#security-exception>security exception</a> whenever
   any of the members of a <code><a href=#location>Location</a></code> object are accessed by
   scripts whose <a href=#effective-script-origin>effective script origin</a> is not the <a href=#same-origin title="same origin">same</a> as the <code><a href=#location>Location</a></code>
   object's associated <code>Document</code>'s <a href=#effective-script-origin>effective script

Received on Tuesday, 18 November 2008 03:44:37 UTC