Documentation only jsconsole (#17384)
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
48eab5370a
commit
cfe2f126e5
1 changed files with 12 additions and 0 deletions
|
|
@ -9,6 +9,18 @@
|
|||
|
||||
## Wrapper for the `console` object for the `JavaScript backend
|
||||
## <backends.html#backends-the-javascript-target>`_.
|
||||
##
|
||||
## Styled Messages
|
||||
## ===============
|
||||
##
|
||||
## CSS-styled messages in the browser are useful for debugging purposes.
|
||||
## To use them, prefix the message with one or more `%c`,
|
||||
## and provide the CSS style as the last argument.
|
||||
## The amount of `%c`'s must match the amount of CSS-styled strings.
|
||||
##
|
||||
runnableExamples("-r:off"):
|
||||
console.log "%c My Debug Message", "color: red" # Notice the "%c"
|
||||
console.log "%c My Debug %c Message", "color: red", "font-size: 2em"
|
||||
|
||||
import std/private/since, std/private/miscdollars # toLocation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue