mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
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:
parent
4758ffabca
commit
50c930866b
20 changed files with 545 additions and 40 deletions
|
@ -191,11 +191,9 @@ impl PerformanceObserverMethods for PerformanceObserver {
|
|||
|
||||
// Step 6.3
|
||||
if entry_types.is_empty() {
|
||||
Console::Warn(
|
||||
Console::internal_warn(
|
||||
&*self.global(),
|
||||
vec![DOMString::from(
|
||||
"No valid entry type provided to observe().",
|
||||
)],
|
||||
DOMString::from("No valid entry type provided to observe()."),
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
@ -210,11 +208,9 @@ impl PerformanceObserverMethods for PerformanceObserver {
|
|||
} else if let Some(entry_type) = &options.type_ {
|
||||
// Step 7.2
|
||||
if !VALID_ENTRY_TYPES.contains(&entry_type.as_ref()) {
|
||||
Console::Warn(
|
||||
Console::internal_warn(
|
||||
&*self.global(),
|
||||
vec![DOMString::from(
|
||||
"No valid entry type provided to observe().",
|
||||
)],
|
||||
DOMString::from("No valid entry type provided to observe()."),
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue