Skip to content

Fails to parse hostname correctly on Chrome #133

Closed
@rotu

Description

@rotu

URL parsing relies on the native URL implementation, which is buggy.

So new URLPattern({hostname:'example.com'}).test("foo://example.com") returns false in Chrome when using this polyfill. The root cause seems to be a noncompliant URL implementation: https://issues.chromium.org/issues/40063064

Maybe this should use https://www.npmjs.com/package/whatwg-url instead of the native implementation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions