OSDN Git Service

fixed race condition
authorJohn-Anthony Elenis <johnanthonyelenis@gmail.com>
Sat, 24 Aug 2019 17:21:10 +0000 (13:21 -0400)
committerJohn-Anthony Elenis <johnanthonyelenis@gmail.com>
Sat, 24 Aug 2019 17:21:10 +0000 (13:21 -0400)
js/_utils.js

index a4138a5..b8c19d1 100644 (file)
@@ -40,15 +40,16 @@ class Logger {
                        </div>
                        </div>
                        <!-- End Debug Console -->`);
-
+      this.$log= $("#console .terminal");
+      this.$autoscroll = $("#console input");
+      this.$buttonTrigger = $("#buttonTrigger");
+      
                        window.onerror = (e) => {
                                this.error(e);
                        };
 
                        $(document).ready(() => {
-                               this.$log= $("#console .terminal");
-                               this.$autoscroll = $("#console input");
-                               this.$buttonTrigger = $("#buttonTrigger");
+
 
                                this.$log.keypress(function(e) {
                                        e.preventDefault();