While this doesn't fail on Lightpanda:
let a = new URL("://foo.bar/path?query#fragment");
// a.protocol => ":"
It fails on Chrome:
let a = new URL("://foo.bar/path?query#fragment");
VM217:1 Uncaught TypeError: Failed to construct 'URL': Invalid URL
at <anonymous>:1:5