Skip to content

Commit

Permalink
Merge pull request #3294 from Carreau/jsfix
Browse files Browse the repository at this point in the history
fix callbacks as optional in js kernel.execute
  • Loading branch information
Carreau committed May 11, 2013
2 parents 027d51b + 6d687c6 commit 9876542
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions IPython/frontend/html/notebook/static/js/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,16 @@ var IPython = (function (IPython) {
/**
* Execute given code into kernel, and pass result to callback.
*
* TODO: document input_request in callbacks
*
* @async
* @method execute
* @param {string} code
* @param callback {Object} With the following keys
* @param callback.'execute_reply' {function}
* @param callback.'output' {function}
* @param callback.'clear_output' {function}
* @param callback.'set_next_input' {function}
* @param [callbacks] {Object} With the optional following keys
* @param callbacks.'execute_reply' {function}
* @param callbacks.'output' {function}
* @param callbacks.'clear_output' {function}
* @param callbacks.'set_next_input' {function}
* @param {object} [options]
* @param [options.silent=false] {Boolean}
* @param [options.user_expressions=empty_dict] {Dict}
Expand Down Expand Up @@ -291,6 +293,7 @@ var IPython = (function (IPython) {
user_expressions : {},
allow_stdin : false
};
callbacks = callbacks || {};
if (callbacks.input_request !== undefined) {
content.allow_stdin = true;
}
Expand Down

0 comments on commit 9876542

Please sign in to comment.