- From: Web APIs Issue Tracker <dean+cgi@w3.org>
- Date: Tue, 4 Apr 2006 09:56:47 +0000 (GMT)
- To: public-webapi@w3.org
ISSUE-67: Should resolution of relative URI references sent to location be defined in JS bindings or generally? http://www.w3.org/2005/06/tracker/webapi/issues/67 Raised by: Maciej Stachowiak On product: Window Assigning a relative URI reference to window.location (or using location.assing() or location.replace()) from JS has an odd quirk: the URI is resolved relative to the location of the window currently executing code, rather than the location it is actually being assigned to. This is kind of weird, and also doesn't make sense for languages other than ECMAScript. I can imagine the following possibilities: 1) Drop this behavior for all languages including ECMAScript, and just always resolve based on the location's current URI. This will probably break content - not sure how to tell. 2) Make the general definition be like the current ECMAScript behavior, but I don't know how this could work. Other languages wouldn't have a concept of currently executing Window since they do not use Window as their global object. 3) Make the general definition resolve with the target location's current href as the base, but ECMAScript bindings define a quirk that they use the source window's location instead, if different. 4) Make other languages only accept absolute URIs, and make relative URIs an ECMAScript-only extension with the weird ES behavior above. I would prefer #1 if it were doable, but if that turns out to be too likely to break content then I think #3 would be a good choice. Thoughts?
Received on Tuesday, 4 April 2006 09:56:57 UTC