Skip to content

URL#searchParams#delete removes "?" #14020

Closed

Description

@stevenvachon
const {URL} = require("url");

const url = new URL("http://host/?param");
url.searchParams.delete("param");
url.href;
//-> http://host/

It should produce http://host/? according to @TimothyGu.

Activity

  1. added
    whatwg-urlIssues and PRs related to the WHATWG URL implementation.
    on Jul 1, 2017
  2. TimothyGu commented on Jul 1, 2017

    @TimothyGu
    Member

    I added this test case to WPT in web-platform-tests/wpt#6445. Let's fix it in Node.js after that PR is merged, since our current behavior seems to be the same as many browsers.

  3. TimothyGu commented on Jul 12, 2017

    @TimothyGu
    Member

    The behavior was changed after #10480 (which, comically, was also filed by @stevenvachon).

  4. stevenvachon commented on Jul 18, 2017

    @stevenvachon
    Author
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

    confirmed-bugIssues and PRs for confirmed bugs.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions