From 9cb1559d5e24967ebfc628e4ec52c3935fc144cb Mon Sep 17 00:00:00 2001 From: MinRK Date: Mon, 9 Apr 2012 15:34:54 -0700 Subject: [PATCH] document initially hidden javascript container --- IPython/frontend/html/notebook/static/js/codecell.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/codecell.js b/IPython/frontend/html/notebook/static/js/codecell.js index 84055b7b0..5119461d8 100644 --- a/IPython/frontend/html/notebook/static/js/codecell.js +++ b/IPython/frontend/html/notebook/static/js/codecell.js @@ -686,13 +686,14 @@ var IPython = (function (IPython) { }; - CodeCell.prototype.append_javascript = function (js, e) { + CodeCell.prototype.append_javascript = function (js, container) { // We just eval the JS code, element appears in the local scope. var element = $("
").addClass("box_flex1 output_subarea"); - e.append(element); + container.append(element); // Div for js shouldn't be drawn, as it will add empty height to the area. - e.hide(); - + container.hide(); + // If the Javascript appends content to `element` that should be drawn, then + // it must also call `container.show()`. eval(js); }