Skip to content

URL with Object.prototype.toString #10554

Closed
@stevenvachon

Description

@stevenvachon

In Chrome:

Object.prototype.toString.call( new URL("http://domain.com/") )
//-> [object URL]

In Node:

const URL = require("url").URL;
Object.prototype.toString.call( new URL("http://domain.com/") )
//-> [object Object]

@jasnell

Activity

targos

targos commented on Dec 31, 2016

@targos
Member

Edge and Firefox also return [object URL]. +1 for consistency but it would be nice to have it in the specification.

added
urlIssues and PRs related to the legacy built-in url module.
on Dec 31, 2016
stevenvachon

stevenvachon commented on Dec 31, 2016

@stevenvachon
Author

This is already defined in the spec, because the spec uses Web IDL.

added a commit that references this issue on Jan 3, 2017
added
whatwg-urlIssues and PRs related to the WHATWG URL implementation.
on Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    urlIssues and PRs related to the legacy built-in url module.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

        Participants

        @mscdex@stevenvachon@targos@joyeecheung

        Issue actions

          URL with Object.prototype.toString · Issue #10554 · nodejs/node