summaryrefslogtreecommitdiff
path: root/web/static/dartboat.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r--web/static/dartboat.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index 285a98e..06d9d10 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -209,3 +209,11 @@ document.addEventListener('keydown', e => {
else if (e.key == 'u')
promptHandle('undo');
});
+
+function boatReady() {
+ if (document.readyState === 'loading')
+ document.addEventListener('DOMContentLoaded', () =>
+ Module.ccall('init'));
+ else
+ Module.ccall('init');
+}