mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user