The URL interface represents an object providing static methods used for creating, parsing, and manipulating URLs.
hash: stringThe hash property of the URL interface is a string that starts with a # and is followed by the fragment identifier of the URL.
It returns an empty string if the URL does not contain a fragment identifier.
host: stringThe host property of the URL interface is a string that includes the URL.hostname and the URL.port if one is specified in the URL includes by including a : followed by the port number.
hostname: stringThe hostname property of the URL interface is a string that represents the fully qualified domain name of the URL.
href: stringThe href property of the URL interface is a string that represents the complete URL.
origin: stringThe origin property of the URL interface is a string that represents the origin of the URL, that is the URL.protocol, URL.host, and URL.port.
password: stringThe password property of the URL interface is a string that represents the password specified in the URL.
pathname: stringThe pathname property of the URL interface is a string that represents the path of the URL.
port: stringThe port property of the URL interface is a string that represents the port of the URL if an explicit port has been specified in the URL.
protocol: stringThe protocol property of the URL interface is a string that represents the protocol scheme of the URL and includes a trailing :.
search: stringThe search property of the URL interface is a string that represents the search string, or the query string, of the URL.
This includes the ? character and the but excludes identifiers within the represented resource such as the URL.hash. More granular control can be found using URL.searchParams property.
searchParams: URLSearchParamsThe searchParams property of the URL interface is a URL.URLSearchParams object that represents the search parameters of the URL.
username: stringThe username property of the URL interface is a string that represents the username of the URL.