[html5] r2413 - [] (0) location.resolveURL() for resolving relative URLs (for sending to workers [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Nov 17 19:40:54 PST 2008


Author: ianh
Date: 2008-11-17 19:40:53 -0800 (Mon, 17 Nov 2008)
New Revision: 2413

Modified:
   index
   source
Log:
[] (0) location.resolveURL() for resolving relative URLs (for sending to workers, in particular) (credit: js)

Modified: index
===================================================================
--- index	2008-11-17 22:38:11 UTC (rev 2412)
+++ index	2008-11-18 03:40:53 UTC (rev 2413)
@@ -17,7 +17,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 17 November 2008</h2>
+   <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 18 November 2008</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <dl><dt>Multiple-page version:</dt>
@@ -36169,7 +36169,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>;
@@ -36177,6 +36177,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>
@@ -36217,6 +36220,18 @@
   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>
 
+<!--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.
+
+reload on shared Document updates all of them
+
+user reload must be equivalent to .reload()
+-->
+
   <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
@@ -36226,18 +36241,13 @@
   same as setting the <code title=dom-location-href><a href=#dom-location-href>href</a></code>
   attribute to the new output value.</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.
+  <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.</p>
 
-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

Modified: source
===================================================================
--- source	2008-11-17 22:38:11 UTC (rev 2412)
+++ source	2008-11-18 03:40:53 UTC (rev 2413)
@@ -41168,7 +41168,7 @@
   void <span title="dom-location-replace">replace</span>(in DOMString url);
   void <span title="dom-location-reload">reload</span>();
 
-    // <span>URL decomposition attributes</span> <!-- blame brendan for these "innovative" names -->
+  // <span>URL decomposition attributes</span> <!-- blame brendan for these "innovative" names -->
            attribute DOMString <span title="dom-location-protocol">protocol</span>;
            attribute DOMString <span title="dom-location-host">host</span>;
            attribute DOMString <span title="dom-location-hostname">hostname</span>;
@@ -41176,6 +41176,9 @@
            attribute DOMString <span title="dom-location-pathname">pathname</span>;
            attribute DOMString <span title="dom-location-search">search</span>;
            attribute DOMString <span title="dom-location-hash">hash</span>;
+
+  // resolving relative URLs
+  DOMString <span title="dom-location-resolveURL">resolveURL</span>(in DOMString url);
 };</pre>
 
   <p>The <dfn title="dom-location-href"><code>href</code></dfn>
@@ -41221,6 +41224,18 @@
   with the <span>script browsing context</span> of the script that
   invoked the method as the <span>source browsing context</span>.</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.
+
+reload on shared Document updates all of them
+
+user reload must be equivalent to .reload()
+-->
+
   <p>The <code>Location</code> interface also has the complement of
   <span>URL decomposition attributes</span>, <dfn
   title="dom-location-protocol"><code>protocol</code></dfn>, <dfn
@@ -41240,17 +41255,15 @@
   same as setting the <code title="dom-location-href">href</code>
   attribute to the new output value.</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.
+  <hr>
 
-reload on shared Document updates all of them
+  <p>The <dfn title="dom-location-resolveURL"><code>resolveURL(<var
+  title="">url</var>)</code></dfn> method must <span title="resolve a
+  url">resolve</span> its <var title="">url</var> argument, and if
+  that succeeds, return the resulting <span>absolute URL</span>. If it
+  fails, it must throw a <code>SYNTAX_ERR</code> exception
+  instead.</p>
 
-user reload must be equivalent to .reload()
--->
 
   <h5>Security</h5>
 




More information about the Commit-Watchers mailing list