aboutsummaryrefslogtreecommitdiff
path: root/src/console.rs
diff options
context:
space:
mode:
authorJoris2020-01-28 09:55:58 +0100
committerJoris2020-01-29 10:12:31 +0100
commit1b6a7e0d00703e3da2e1620b5a2b2cba027161de (patch)
tree5143f784e1529d3b6c04116c84f09c426bb257b0 /src/console.rs
parent197b6fa7aa810147d63209408c3a378ec552d0f4 (diff)
Implement game of life
Diffstat (limited to 'src/console.rs')
-rw-r--r--src/console.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/console.rs b/src/console.rs
new file mode 100644
index 0000000..4efbd80
--- /dev/null
+++ b/src/console.rs
@@ -0,0 +1,5 @@
+use wasm_bindgen::prelude::JsValue;
+
+pub fn log(str: &str) {
+ web_sys::console::log_1(&JsValue::from_str(str));
+}