canParse

fun canParse(url: String, base: String = definedExternally): Boolean(source)

The URL.canParse() static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.

MDN Reference


fun canParse(url: URL, base: String = definedExternally): Boolean(source)
fun canParse(url: String, base: URL): Boolean(source)
fun canParse(url: URL, base: URL): Boolean(source)