New URL() parsing is not consistent with Node or Browsers

So I’m trying to parse a URL to get another like so:

const pathname = new URL('').pathname;

If you paste that into Node, Chrome, Firefox, Safari, you’ll get:


If you paste it into a worker, you’ll get:


Yeah can confirm and made an example worker:

I have posted this in the Discord for the team to see

1 Like