浏览代码

Add worker-repl fn

Tienson Qin 1 年之前
父节点
当前提交
ec39bf0628
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/dev-cljs/shadow/user.clj

+ 6 - 0
src/dev-cljs/shadow/user.clj

@@ -10,3 +10,9 @@
   []
   (api/watch :electron)
   (api/repl :electron))
+
+;; Get the runtime id from http://localhost:9630/runtimes, pick the one which shows `browser-worker`
+(defn worker-repl
+  [runtime-id]
+  (assert runtime-id "runtime-id shouldn't be empty")
+  (api/repl :app {:runtime-id runtime-id}))