host

abstract val host: String

URL: host

From MDN: "The host property of the URL interface is a string containing the host, that is the hostname, and then, if the port of the URL is nonempty, a ':', followed by the port of the URL."

 

Notes & further reading

Example value:

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

// `host` includes any non-standard port:
const url = new URL("https://elide.dev:123/?one=two#hello");
url.host;
← "elide.dev:123"