diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index eac9a2808..f284e575a 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -655,6 +655,8 @@ var IPython = (function (IPython) { CodeCell.prototype.append_mime_type = function (json, element) { if (json.html !== undefined) { this.append_html(json.html, element); + } else if (json.javascript !== undefined) { + this.append_javascript(json.javascript, element); } else if (json.latex !== undefined) { this.append_latex(json.latex, element); } else if (json.svg !== undefined) { @@ -676,6 +678,12 @@ var IPython = (function (IPython) { }; + CodeCell.prototype.append_javascript = function (js, element) { + // We just eval the JS code, element appears in the local scope. + eval(js); + } + + CodeCell.prototype.append_text = function (data, element, extra_class) { var toinsert = $("
").addClass("box_flex1 output_subarea output_text"); // escape ANSI & HTML specials in plaintext: diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js index 898672bf1..013bba571 100644 --- a/IPython/frontend/html/notebook/static/js/notebook.js +++ b/IPython/frontend/html/notebook/static/js/notebook.js @@ -993,7 +993,6 @@ var IPython = (function (IPython) { } else if (msg_type === 'status') { if (content.execution_state === 'busy') { $([IPython.events]).trigger('status_busy.Kernel'); - IPython.kernel_status_widget.status_busy(); } else if (content.execution_state === 'idle') { $([IPython.events]).trigger('status_idle.Kernel'); } else if (content.execution_state === 'dead') {