/[suikacvs]/webroot/www/url/urlresolution.en.html
Suika

Diff of /webroot/www/url/urlresolution.en.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Sat Jul 5 14:13:35 2008 UTC revision 1.3 by wakaba, Sat Jul 5 14:36:58 2008 UTC
# Line 64  var { Line 64  var {
64      doc.write ('<a href="' + htescape (resolvedURL) + '">xx</a>');      doc.write ('<a href="' + htescape (resolvedURL) + '">xx</a>');
65      doc.close ();      doc.close ();
66            
67      var resultURL = doc.getElementsByTagName ('a')[0].href;      var aEl = doc.getElementsByTagName ('a')[0];
68        var resultURL = aEl.href;
69      var output = document.getElementsByTagName ('output')[0];      var output = document.getElementsByTagName ('output')[0];
70      output.innerHTML = '';      output.innerHTML = '';
71      if (typeof (resultURL) == 'undefined') {      if (typeof (resultURL) == 'undefined') {
# Line 77  var { Line 78  var {
78        output.innerHTML = '<code>' + htescape2 ('' + resultURL) +        output.innerHTML = '<code>' + htescape2 ('' + resultURL) +
79            '</code> of type <code>' + htescape (typeof (resultURL)) + '</code>';            '</code> of type <code>' + htescape (typeof (resultURL)) + '</code>';
80      }      }
81    
82        var resultBaseURL = aEl.baseURI;
83        var output = document.getElementById ('output-base-url');
84        output.innerHTML = '';
85        if (typeof (resultBaseURL) == 'undefined') {
86          output.innerHTML = '(<code>undefined</code>)';
87        } else if (resultBaseURL === null) {
88          output.innerHTML = '(<code>null</code>)';
89        } else if (resultBaseURL === '') {
90          output.innerHTML = '(empty string)';
91        } else {
92          output.innerHTML = '<code>' + htescape2 ('' + resultBaseURL) +
93              '</code> of type <code>' + htescape (typeof (resultBaseURL)) + '</code>';
94        }
95    } // realUpdate    } // realUpdate
96    
97    window.onload = function () {    window.onload = function () {
# Line 109  var { Line 124  var {
124  <dt>Result (Using <code>base href</code> and  <dt>Result (Using <code>base href</code> and
125  <code>HTMLAnchorElement.href</code>):  <code>HTMLAnchorElement.href</code>):
126    <dd><output></output>    <dd><output></output>
127    <dt>Effective base URL (as per <code>Node.baseURI</code>)
128      <dd><output id=output-base-url></output>
129  </dl>  </dl>
130    
131  <iframe></iframe>  <iframe></iframe>

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24