mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
fix Brian and Min comment
This commit is contained in:
parent
9f2203340a
commit
aa5477beb7
@ -552,19 +552,22 @@ var IPython = (function (IPython) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
OutputArea.prototype.append_javascript = function (js, md, container) {
|
OutputArea.prototype.append_javascript = function (js, md, element) {
|
||||||
// We just eval the JS code, element appears in the local scope.
|
// We just eval the JS code, element appears in the local scope.
|
||||||
var type = 'application/javascript';
|
var type = 'application/javascript';
|
||||||
var element = this.create_output_subarea(md, "output_javascript", type);
|
var toinsert = this.create_output_subarea(md, "output_javascript", type);
|
||||||
IPython.keyboard_manager.register_events(element);
|
IPython.keyboard_manager.register_events(toinsert);
|
||||||
container.append(element);
|
element.append(toinsert);
|
||||||
|
//backward compat, js should be eval'ed in a context where `container` is defined.
|
||||||
|
var container = element;
|
||||||
|
container.show = function(){console.log('Warning "container.show()" is deprecated.')};
|
||||||
try {
|
try {
|
||||||
eval(js);
|
eval(js);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
this._append_javascript_error(err, element);
|
this._append_javascript_error(err, toinsert);
|
||||||
}
|
}
|
||||||
return container;
|
return toinsert;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user