Skip to content

WHATWG URL support #33

Open
Open

Description

@stevenvachon

was added as an experimental feature in Node 7.0, which will become official in 8.x

I'm working on these to help: hasurl, isurl, universal-url

Activity

  1. felixfbecker commented on Apr 30, 2017

    @felixfbecker
  2. stevenvachon commented on Apr 30, 2017

    @stevenvachon
    Author

    That's what universal-url uses, and also provides universal-url-lite for file size control.

  3. CMCDragonkai commented on Sep 13, 2017

    @CMCDragonkai

    Making the url name on npm use the latest node style URL or whatwg-url would make it much easier to do polyfills, since you can always just write import { URL } from 'url';, and if it is node that will use the builtin version, while if it is in non-node environment, that will use the polyfill. I was hoping to be able to do this, but this current url package does not expose the URL constructor in accordance to whatwg url and the browser's window.URL.

    @stevenvachon Thanks for pointing out universal-url project to me, it looks like I can make do with this for now.

  4. gwiron commented on Sep 14, 2017

    @gwiron
  5. sheepsteak commented on Mar 3, 2018

    @sheepsteak

    Is it worth depending on url-polyfill and re-exporting URL and URLSearchParams?

    It seems to be a small polyfill although it doesn't claim to have 100% support of the API.

  6. stevenvachon commented on Nov 28, 2018

    @stevenvachon
    Author

    http in Node.js v11 uses URL under the hood by default.

  7. ljharb commented on Jan 27, 2021

    @ljharb
    Collaborator

    Does node's url module support this? If so, great! A PR would be appreciated. If not, we can't add this feature, and this should be closed, in favor of a feature request on node itself.

  8. ljharb commented on Jan 27, 2021

    @ljharb
    Collaborator

    Looks like the URL property was added sometime in node 6 (between v6.6, where it's absent, and v6.17, where it's present) so we'll add it as we catch up to that featureset.

  9. stevenvachon commented on Jan 29, 2021

    @stevenvachon
    Author

    I remember it being added in v7, then back-ported to v6. I'm not sure if v6 has globalThis.URL or only has require('node').URL.

  10. marked url.URL is undefined #78 as a duplicate of this issue on May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions