[whatwg/url] URL#searchParams#delete and "?" delimiter (#332)

In https://github.com/w3c/web-platform-tests/pull/6445#issuecomment-313391675 we are suggesting that this should be true:

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

There is no reason to preserve the trailing delimiter when the user of `URL` has chosen to make a mutation.

Consider this analogy:

```js
const url1 = new URL("http://host/#asdf");
url1.hash = "";
url1.href;  //-> http://host/

const url2 = new URL("http://host/#");
url2.href;  //-> http://host/#
url2.hash = "";
url2.href;  //-> http://host/
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/332

Received on Thursday, 6 July 2017 13:22:01 UTC