Closed danvk closed 2 years ago
Fixes #312
This turns out not to be very deep: you have to pass an optional second parameter to the URL constructor to resolve relative URLs.
URL
> new URL('/path/to/file#hashcode').pathnaem VM252:1 Uncaught TypeError: Failed to construct 'URL': Invalid URL at <anonymous>:1:1 (anonymous) @ VM252:1 > new URL('/path/to/file#hashcode', 'http://example.com/').pathname "/path/to/file"
Fixes #312
This turns out not to be very deep: you have to pass an optional second parameter to the
URL
constructor to resolve relative URLs.