The first part sets up an HTML <pre> element for logging and a logging method log(). It then checks the support for URL.canParse() using the condition 'canParse' in URL.
It proceeds to log the results of checking an absolute URL, a relative URL without a base URL, and a relative URL with a valid base URL. It additionally logs the outcome when URL.canParse() is unsupported.
Collection
[
|
...
]