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

Changes in Logger() definition #231

Open
jimmonte opened this issue Dec 2, 2023 · 3 comments
Open

Changes in Logger() definition #231

jimmonte opened this issue Dec 2, 2023 · 3 comments

Comments

@jimmonte
Copy link

jimmonte commented Dec 2, 2023

What is the issue with the Console Standard?

The returned value types of the three return points of Logger() at https://console.spec.whatwg.org/#logger are not consistent but should be. Further, since Formatter(x) returns x when the size of x is one, steps 2, 3, and 4 can be eliminated.

@domfarolino
Copy link
Member

It does seem that Logger() doesn't need to return anything. The note below Logger() mentioning that the return value matters for consoles that tend to print return values of functions doesn't really apply here, since the return value of Logger() is never used anywhere, and that's more of a function of what the Web IDL says the return value is and how browsers treat that, vs what Logger() specifically returns.

I don't understand your second point about Formatter(x).

@domfarolino
Copy link
Member

Pull requests are welcome.

@jimmonte
Copy link
Author

jimmonte commented Dec 2, 2023

@domfarolino

It does seem that Logger() doesn't need to return anything.

Whatever it returns, even if it is nothing, should be the same at all of its return points.

I don't understand your second point about Formatter(x).

There is no need for a separate case to print a single object since calling Formatter() with that object will return that object. So the definition can be simplified by combining the cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants