- project.runjs = project.runjs || '';
- if (project.runjs.length) {
- this.el.execute_script(project.runjs);
+
+ project.runhtml = project.runhtml || '';
+
+
+ this.runhtml = this.runhtml || '';
+
+ if (project.runhtml != this.runhtml) {
+ // then we need to reload the browser using
+ // load_html_string..
+
+ // then trigger a redraw once it's loaded..
+ this.pendingRedraw = true;
+
+ this.runhtml = project.runhtml;
+
+ var html = File.read(script_path__ + '/../builder.html');
+ var html = html.replace('</head>', this.runhtml + '</head>');
+
+ this.load_html_string( html , 'file:///' + __script_path__ + '/../builder.html');
+ // should trigger load_finished!
+ return;
+
+ }
+
+ this.pendingRedraw = false;
+
+
+ this.renderedData = data;
+ var str = JSON.stringify(data) ;
+
+ if (!this.ready) {
+ console.log('not loaded yet');