FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lib,url: correct URL's argument to pass idlharness by XadillaX · Pull Request #39848 · nodejs/node · GitHub

/ node Public

lib,url: correct URL's argument to pass idlharness - #39848

Closed
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:url-idlharness
Closed

lib,url: correct URL's argument to pass idlharness#39848
XadillaX wants to merge 1 commit into
nodejs:masterfrom
XadillaX:url-idlharness

Conversation

XadillaX commented Aug 23, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

url.idl defines URL's constructor as:

constructor(USVString url, optional USVString base);

idlharness.any.js checks its length as 1. So we should remove
constructor's second argument and use arguments[1] in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

nodejs-github-bot added needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation. labels Aug 23, 2021

targos commented Aug 23, 2021

Copy link
Copy Markdown
Member

I'd prefer to use a default value: constructor(input, base = undefined) {

Comment thread test/wpt/test-url.js Outdated
Comment thread lib/internal/url.js Outdated
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

XadillaX added a commit that referenced this pull request Aug 26, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: #39848
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>

Copy link
Copy Markdown
Contributor Author

Landed in 48655e1

targos commented Sep 6, 2021

Copy link
Copy Markdown
Member

This depends on the semver-major #39176. Would you like to backport?

targos pushed a commit to targos/node that referenced this pull request Oct 9, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: nodejs#39848
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Nov 4, 2021
`url.idl` defines URL's constructor as:

```
constructor(USVString url, optional USVString base);
```

`idlharness.any.js` checks its length as `1`. So we should remove
constructor's second argument and use `arguments[1]` in constructor's
logic.

Refs: https://url.spec.whatwg.org/#idl-index

PR-URL: #39848
Backport-PR-URL: #40383
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs mentioned this pull request Nov 26, 2021
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL