+4
src/console_ffi.mjs
+4
src/console_ffi.mjs
+7
src/plinth/javascript/console.gleam
+7
src/plinth/javascript/console.gleam
···
25
25
/// If the assertion is true, nothing happens.
26
26
@external(javascript, "../../console_ffi.mjs", "assert")
27
27
pub fn assert_(assertion: Bool, value: a) -> Nil
28
+
29
+
/// clears the console if the console allows it. A graphical console,
30
+
/// like those running on browsers, will allow it; a console displaying
31
+
/// on the terminal, like the one running on Node, will not support it,
32
+
/// and will have no effect (and no error).
33
+
@external(javascript, "../../console_ffi.mjs", "clear")
34
+
pub fn clear() -> Nil