The output below will display a URL's parsed components from the browser versus those given by jsdom/whatwg-url.
jsdom/whatwg-url closely follows the URL Standard and the associated web-platform-tests, so this serves as a good comparison versus the standard itself.
The output will be colored dark green unless a difference occurs between the two parsers in which case the affected URL component will be colored red.
Most of the time, you don't need to worry about this. But if you want to test characters outside of the U+0021 (!) through U+007E (~) range, which can be harder to input or to visually distinguish, you can use this field. Any strings of the form \u{number} will be decoded to their corresponding Unicode code point. So for example, you could test how null characters are processed by the URL parser by using the input test:\u{0000}.
href | |
---|---|
protocol | |
username | |
password | |
port | |
hostname | |
pathname | |
search | |
hash | |
origin |
href | |
---|---|
protocol | |
username | |
password | |
port | |
hostname | |
pathname | |
search | |
hash | |
origin |