- From: Maciej Stachowiak <mjs@apple.com>
- Date: Tue, 03 May 2011 13:31:59 -0700
- To: "Roy T. Fielding" <fielding@gbiv.com>
- Cc: public-iri@w3.org
On May 3, 2011, at 12:24 PM, Roy T. Fielding wrote: > On May 3, 2011, at 11:00 AM, Maciej Stachowiak wrote: >> My example was meant to illustrate a case where relative resolution against a non-hierarchical URI scheme may actually come up in Web content. I draw no conclusions about whether any specific behavior is required for Web content. Although testing 5 browsers and getting 4 different answers implies to me that we really need a clearly defined behavior for this case. If you would like to see an example of relative resolution against a non-hierarchical URI that has full interop, try this: >> >> <iframe id=foo src="about:blank" onload="test()"></iframe> >> <script> >> var doc = document.getElementById("foo").contentDocument; >> var anchor = doc.createElement("a"); >> anchor.setAttribute("href", "foo.html") >> doc.body.appendChild(anchor); >> alert(anchor.href); >> </script> >> >> I believe you will consistently get resolution against the URL of the parent document. I am reasonably confident cases like this *do* affect Web compatibility, though the deviation here is outside the scope of URL parsing itself. > > Color me confused. I have never seen actual (non-test) content > on the Web that has an arbitrary base URI (one that is unusable > in practice). What is the use case? Is this a javascript idiom > that I am not familiar with? In the test case quoted above, "about:blank" is a real URI that actually gets loaded. It neither arbitrary nor unusable. Regards, Maciej
Received on Tuesday, 3 May 2011 20:32:30 UTC