diff --git a/notebook/static/notebook/js/notebook.js b/notebook/static/notebook/js/notebook.js index a9f337b9e..488a46d5b 100644 --- a/notebook/static/notebook/js/notebook.js +++ b/notebook/static/notebook/js/notebook.js @@ -2005,6 +2005,17 @@ define(function (require) { this.execute_cells(this.get_marked_indices()); }; + /** + * Alias for execute_marked_cells, for backwards compatibility -- + * previously, doing "Run Cell" would only ever run a single cell (hence + * `execute_cell`), but now it runs all marked cells, so that's the + * preferable function to use. But it is good to keep this function to avoid + * breaking existing extensions, etc. + */ + Notebook.prototype.execute_cell = function () { + this.execute_marked_cells(); + }; + /** * Execute or render cell outputs and insert a new cell below. */