port

abstract val port: Int?

URL: port

From MDN: "The port property of the URL interface is a string containing the port number of the URL."

 

Notes & further reading

Example value:

// for a standard port:
const url = new URL("https://elide.dev/?one=two#hello");
url.port;
← 443

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