Make console methods take any instead of string (#31241)

* Make console methods use `any` for the message

Match the Console spec by allowing any value to be passed to console
methods, instead of just values that can be converted to a string.

Signed-off-by: syvb <me@iter.ca>

* Add test for console logging a Symbol

Signed-off-by: syvb <me@iter.ca>

* Implement object stringification for logs

Signed-off-by: syvb <me@iter.ca>

* Address review comments

Signed-off-by: syvb <me@iter.ca>

* Make time/timeEnd accept DOMString to match spec

* Update WPT results for layout 2013

---------

Signed-off-by: syvb <me@iter.ca>
This commit is contained in:
Smitty 2024-02-05 09:30:53 -05:00 committed by GitHub
parent 4758ffabca
commit 50c930866b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 545 additions and 40 deletions

View file

@ -0,0 +1,26 @@
[console-namespace-object-class-string.any.html]
[@@toStringTag exists on the namespace object with the appropriate descriptor]
expected: FAIL
[Object.prototype.toString applied to the namespace object]
expected: FAIL
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
expected: FAIL
[Object.prototype.toString applied after deleting @@toStringTag]
expected: FAIL
[console-namespace-object-class-string.any.worker.html]
[@@toStringTag exists on the namespace object with the appropriate descriptor]
expected: FAIL
[Object.prototype.toString applied to the namespace object]
expected: FAIL
[Object.prototype.toString applied after modifying the namespace object's @@toStringTag]
expected: FAIL
[Object.prototype.toString applied after deleting @@toStringTag]
expected: FAIL