Closed Bug 1249293 Opened 8 years ago Closed 4 years ago

Updating and/or clarifying support for location

Categories

(Developer Documentation Graveyard :: API: DOM, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: chris, Unassigned)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

It seems the properties of `document.location` have varied among web browsers a fair amount, and today I was looking to see what browsers support the `location.pathname` attribute. Following the `Location.pathname` link on the Location page, I saw that the browser compatibility of location.pathname lists all non-Gecko browsers as `Not supported [1]`, with the footnote of "[1] Though not grouped in a single abstract interface, this method is directly available on the interfaces that implement it, if this interface is supported."

As a developer, I glanced at this chart and thought I should not depend on the `pathname` property being on the `document.location` object in any browser other than Firefox. I thought about how I would implement it on my own, and ended up poking at Chrome, Safari, and mobile Safari. In doing so, I found all three had the `pathname` property implemented as I needed.

Confused, I realized the `pathname` page was not for the `Location` object, but for `HTMLHyperlinkElementUtils.pathname`, which seems like a completely different use case.

In the end, I feel there's a gap in the usefulness of the docs. The browser compatibility table on Location is a joke, and the linked page for pathname is not useful because of its unrelated scope. Also, they way Window.location and Document.location link to Location makes it seem like the authority for this context.

Sigh. No easy answers it seems. I don't even feel like filing this request. :\
Component: JavaScript → API: DOM
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.