var YosysJS = new function() { this.script_element = document.currentScript; this.viz_element = undefined; this.viz_ready = true; this.url_prefix = this.script_element.src.replace(/[^/]+$/, '') this.load_viz = function() { if (this.viz_element) return; this.viz_element = document.createElement('iframe') this.viz_element.style.display = 'none' document.body.appendChild(this.viz_element); this.viz_element.contentWindow.document.open(); this.viz_element.contentWindow.document.write('