]> git.sesse.net Git - remoteglot-book/commitdiff
Start the Stockfish web worker as soon as we get to the init phase.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 22 Dec 2014 17:58:30 +0000 (18:58 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 22 Dec 2014 17:58:30 +0000 (18:58 +0100)
www/js/book.js

index dce293b2a8e70392d083b271b68fac7b5fa63059..7a4d7ee5e6dd6d25c26e77282aab1fc537100349 100644 (file)
@@ -534,8 +534,10 @@ var init = function() {
                        prev_move();
                }
        });
-}
 
+       // Seemingly the web worker is not started before we send it a message.
+       stockfish.postMessage("uci");
+}
 
 $(document).ready(init);