console
warning
🚧 This page is work in progress, so please refer to the MDN documentation for more information.
The global console
object, as defined in Web specifications.
Methods
timeStamp()
tsx
console.timeStamp(
label: string,
start?: string | number,
end?: string | number,
trackName?: string,
trackGroup?: string,
color?: DevToolsColor
): void;
The console.timeStamp
API allows you to add custom timing entries in the Performance panel timeline.
Parameters:
Name | Type | Required | Description |
---|---|---|---|
label | string | Yes | The label for the timing entry. |
start | string | number | No |
|
end | string | number | No |
|
trackName | string | No | The name of the custom track. |
trackGroup | string | No | The name of the track group. |
color | DevToolsColor | No | The color of the entry. |
tsx
type DevToolsColor =
| 'primary'
| 'primary-light'
| 'primary-dark'
| 'secondary'
| 'secondary-light'
| 'secondary-dark'
| 'tertiary'
| 'tertiary-light'
| 'tertiary-dark'
| 'warning'
| 'error';