From a8e39d6acc2ee4e6566cd5b6f8f29b7b975456d9 Mon Sep 17 00:00:00 2001 From: Pablo de Oliveira Date: Mon, 7 Oct 2013 11:59:04 +0200 Subject: [PATCH] Support isolated metadata tag for any content Any content whose metadata contains an `isolated` tag will be isolated from the rest of the document. The current implementation wraps isolated content into an iframe. --- IPython/html/static/notebook/js/outputarea.js | 95 +++++++++++-------- 1 file changed, 54 insertions(+), 41 deletions(-) diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js index 9bd501efc..b19312e72 100644 --- a/IPython/html/static/notebook/js/outputarea.js +++ b/IPython/html/static/notebook/js/outputarea.js @@ -327,7 +327,51 @@ var IPython = (function (IPython) { } return oa; }; - + + + OutputArea.prototype.create_output_subarea = function(md, classes) { + var subarea = $('
').addClass('output_subarea').addClass(classes); + if (md['isolated']) { + // Create an iframe to isolate the subarea from the rest of the + // document + var iframe = $('