JsUrl

constructor(url: String)

Parses url, e.g. JsUrl("https://example.com/page").

Throws

if url is not well-formed, including native Windows paths (e.g. C:\Users\...), which JsNativeUrl would otherwise mis-parse as a URL with a single-letter scheme.


constructor(protocol: String, host: String = "", port: Int? = null, path: String = "", query: String? = null)

Builds a JsUrl from its protocol/host/port/path/query components, via Url.toString.