improve jsconsole (#17414)
* Add jsconsole.dir * Update lib/js/jsconsole.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
83ae70cb54
commit
9e1a2e9b63
2 changed files with 12 additions and 0 deletions
|
|
@ -237,6 +237,8 @@
|
|||
- In `std/os`, `getHomeDir`, `expandTilde`, `getTempDir`, `getConfigDir` now do not include trailing `DirSep`,
|
||||
unless `-d:nimLegacyHomeDir` is specified (for a transition period).
|
||||
|
||||
- Added `jsconsole.dir`, `jsconsole.dirxml`, `jsconsole.timeStamp`.
|
||||
|
||||
|
||||
## Language changes
|
||||
|
||||
|
|
|
|||
|
|
@ -110,5 +110,15 @@ since (1, 5):
|
|||
{.line: loc.}:
|
||||
{.emit: ["console.assert(", assertion, ", ", msg, ");"].}
|
||||
|
||||
func dir*(console: Console; obj: auto) {.importcpp.}
|
||||
## https://developer.mozilla.org/en-US/docs/Web/API/Console/dir
|
||||
|
||||
func dirxml*(console: Console; obj: auto) {.importcpp.}
|
||||
## https://developer.mozilla.org/en-US/docs/Web/API/Console/dirxml
|
||||
|
||||
func timeStamp*(console: Console; label: cstring) {.importcpp.}
|
||||
## https://developer.mozilla.org/en-US/docs/Web/API/Console/timeStamp
|
||||
## ..warning:: non-standard
|
||||
|
||||
|
||||
var console* {.importc, nodecl.}: Console
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue