YosysJS firefox fixes
authorClifford Wolf <clifford@clifford.at>
Thu, 19 Feb 2015 12:55:36 +0000 (13:55 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 19 Feb 2015 12:55:36 +0000 (13:55 +0100)
misc/yosysjs/demo03.html
misc/yosysjs/yosysjs.js

index 720b82e90e2673f9cb13bd48bd60749f8ce33fb7..36cc6cf4a48751e867ee0952ed6402bd58647ad3 100644 (file)
@@ -58,7 +58,6 @@ endmodule</span></pre><p/>
                                } else {
                                        wdata = ys.read_file('wave.json');
                                        if (wdata) {
-                                               console.log(wdata)
                                                wdata = JSON.parse(wdata);
                                                function wsignal(signame, newname) {
                                                        for (i = 0; i < wdata["signal"].length; i++)
@@ -81,7 +80,6 @@ endmodule</span></pre><p/>
                                                        "config" : wdata["config"]
                                                };
                                                wdata2 = JSON.stringify(wdata2)
-                                               console.log(wdata2)
                                                w.innerHTML = '<b>The model did not pass verification:</b><p/>' +
                                                                '<script type="WaveDrom">' + wdata2 + '<\/script>';
                                                WaveDrom.ProcessAll();
@@ -98,6 +96,5 @@ endmodule</span></pre><p/>
                YosysJS.load_viz();
                var ys = YosysJS.create('', on_ys_ready);
                ys.logprint = true;
-               ys.echo = true;
        </script>
 </body></html>
index a1181493e0becebc6ea9375ee510a3b666d82499..b0205bf6163ade1ef4aa9378f9b38e38adab040e 100644 (file)
@@ -137,8 +137,11 @@ var YosysJS = new function() {
                        span.textContent = text + "\n";
                        span.style.fontFamily = 'monospace';
                        span.style.whiteSpace = 'pre';
-                       doc.body.appendChild(span);
-                       ys.window.scrollTo(0, doc.body.scrollHeight)
+                       doc.firstChild.appendChild(span);
+                       if (doc.body)
+                               ys.window.scrollTo(0, doc.body.scrollHeight);
+                       else
+                               ys.window.scrollBy(0, 100);
                }
 
                ys.prompt = function() {