Skip to content

URL href mismatch from browsers #36887

Closed
Closed
@addaleax

Description

@addaleax
  • Version: master
  • Platform: any
  • Subsystem: url

What is the expected behavior?

> new (class extends URL { get hostname() { return 'twitter.com'; } })('http://google.com').href
'http://google.com/'

(I mean, I’m not 100 % sure, but this is what Firefox and Chromium return, and it’s what I would expect as well)

What do you see instead?

> new (class extends URL { get hostname() { return 'twitter.com'; } })('http://google.com').href
'http://twitter.com/'

@nodejs/url

Metadata

Metadata

Assignees

No one assigned

    Labels

    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