Skip to content

Default URL when using Happy DOM as environment #3905

@capricorn86

Description

@capricorn86

Clear and concise description of the problem

Happy DOM and JSDOM both default the URL to "about:blank". For the JSDOM environment the URL is set to "http://localhost:3000", while when using Happy DOM it has not been set to any default value.

This is causing issues when constructing relative URLs (see capricorn86/happy-dom#868).

Suggested solution

My suggestion is to default the Happy DOM URL to the same URL as JSDOM (which is "http://localhost:3000").

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions