David M. Gauntt wrote:
Is there a w3c compliant substitute for window.location?
I don't need the full functionality of the location
object; just the ability of getting the URL (including
the search field).
Well the window object is not part of the W3C DOM specification, indeed
that has tried to abstract from user agents. As long as you are
scripting HTML document in browsers there is nothing wrong with using
window
window.document
window.location
I don't see that as not being W3C compliant only because the W3C hasn't
had any interest to standardize that stuff.
SVG 1.2 which is more something like web application tries to
standardize a global object, see
http://www.w3.org/TR/SVG12/api.html#GlobalObject
but I don't think that helps in any way when scripting HTML documents.
--
Martin Honnen
http://JavaScript.FAQTs.com/