pathname

abstract override var pathname: String

URL: pathname

From MDN: "The pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character. If the URL has no path segments, the value of its pathname property will be the empty string."

 

Notes & further reading

Example value:

const url = new URL("https://elide.dev/hello?one=two#hello");
url.pathname;
← "/hello"

Note: This property is present on a mutable version of the URL interface.