Skip to content

[v8.x backport] url: expose the WHATWG URL API globally

Rodrigo Muino Tomonari requested to merge github/fork/guybedford/v8.x into v8.x

This backports #18281 to the v8.x branch: Install URL and URLSearchParams on the global object, like they can be found in browser environments.

What makes this feature so useful is that code written for both the web and Node can do simple URL manipulation to spec, without having to jump through environment detections etc.

But if I wanted to publish a package to npm while supporting NodeJS v8.x this isn't currently possible.

In order to enable these universal workflows, it would be great to get this v8.x support in.

Merge request reports

Loading