test

fun test(input: String = definedExternally, baseURL: String = definedExternally): Boolean(source)

The test() method of the URLPattern interface takes a URL string or object of URL parts, and returns a boolean indicating if the given input matches the current pattern.

MDN Reference


fun test(input: URLPatternInit, baseURL: String = definedExternally): Boolean(source)
fun test(input: String = definedExternally, baseURL: URL): Boolean(source)
fun test(input: URLPatternInit, baseURL: URL): Boolean(source)