<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged webworkers</title>
<link>https://ask.clojure.org/index.php/tag/webworkers</link>
<description></description>
<item>
<title>Error in web console after compiling ClojureScript with target :webworker,  release &gt;= 1.10.738</title>
<link>https://ask.clojure.org/index.php/10292/console-compiling-clojurescript-target-webworker-release</link>
<description>&lt;p&gt;When running this example:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kommen/clojurescript-webworker-demo&quot;&gt;https://github.com/kommen/clojurescript-webworker-demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;using ClojureScript release 1.10.738 or newer, I receive this error message in the web console:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ReferenceError: document is not defined dom.js:2499:3
    DomHelper http://localhost:7777/out/goog/dom/dom.js:2499
    getDomHelper http://localhost:7777/out/goog/dom/dom.js:87
    CrossPageChannel http://localhost:7777/out/goog/net/xpc/crosspagechannel.js:94
    cljs$core$IFn$_invoke$arity$1 http://localhost:7777/out/clojure/browser/net.js:575
    clojure$browser$net$xpc_connection http://localhost:7777/out/clojure/browser/net.js:555
    clojure$browser$repl$connect http://localhost:7777/out/clojure/browser/repl.js:347
    &amp;lt;anonymous&amp;gt; http://localhost:7777/out/clojure/browser/repl/preload.js:7
    CLOSURE_IMPORT_SCRIPT http://localhost:7777/mywebworker.js:3
    load http://localhost:7777/out/goog/base.js:3406
    loadDeps_ http://localhost:7777/out/goog/base.js:3043
    loadDeps_ http://localhost:7777/out/goog/base.js:3047
    load_ http://localhost:7777/out/goog/base.js:2942
    require http://localhost:7777/out/goog/base.js:905
    &amp;lt;anonymous&amp;gt; http://localhost:7777/mywebworker.js:7
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With release 1.10.597, the message &quot;hello from the web worker!&quot; was still printed correctly.&lt;/p&gt;
&lt;p&gt;Is there an easy solution to make the newer release work with webworkers, or is it better to keep using the older release for now?&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10292/console-compiling-clojurescript-target-webworker-release</guid>
<pubDate>Fri, 05 Mar 2021 11:17:26 +0000</pubDate>
</item>
</channel>
</rss>