Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL with Object.prototype.toString #10554

Closed
stevenvachon opened this issue Dec 31, 2016 · 2 comments
Closed

URL with Object.prototype.toString #10554

stevenvachon opened this issue Dec 31, 2016 · 2 comments
Labels
url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation.

Comments

@stevenvachon
Copy link

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

@targos
Copy link
Member

targos commented Dec 31, 2016

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

@mscdex mscdex added the url Issues and PRs related to the legacy built-in url module. label Dec 31, 2016
@stevenvachon
Copy link
Author

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

jasnell added a commit to jasnell/node that referenced this issue Jan 3, 2017
@jasnell jasnell closed this as completed in f5d92f3 Jan 3, 2017
evanlucas pushed a commit that referenced this issue Jan 4, 2017
PR-URL: #10562
Fixes: #10554
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
@joyeecheung joyeecheung added the whatwg-url Issues and PRs related to the WHATWG URL implementation. label Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
url Issues and PRs related to the legacy built-in url module. whatwg-url Issues and PRs related to the WHATWG URL implementation.
Projects
None yet
Development

No branches or pull requests

4 participants