Skip to content

Conversation

@watilde
Copy link
Contributor

@watilde watilde commented Jul 13, 2025

I found out a gap between WHATWG's URL and Node.js as the below and add the test to capture it.

const NodeURL = require("url").URL;
const WhatwgURL = require("../whatwg-url/").URL;
const newPath = '/..';

const url = new NodeURL("foo://path/to");  
url.pathname = newPath;
console.log(url.href); // => foo://path

const url2 = new WhatwgURL("foo://path/to");
url2.pathname = newPath;
console.log(url2.href); // => foo://path/

@domenic domenic merged commit 17f9cb9 into web-platform-tests:master Jul 14, 2025
25 checks passed
@watilde watilde deleted the test/url-path-setter branch July 14, 2025 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants