##// END OF EJS Templates
fix callbacks as optional in js kernel.execute...
Matthias BUSSONNIER -
Show More
@@ -231,14 +231,16 b' var IPython = (function (IPython) {'
231 /**
231 /**
232 * Execute given code into kernel, and pass result to callback.
232 * Execute given code into kernel, and pass result to callback.
233 *
233 *
234 * TODO: document input_request in callbacks
235 *
234 * @async
236 * @async
235 * @method execute
237 * @method execute
236 * @param {string} code
238 * @param {string} code
237 * @param callback {Object} With the following keys
239 * @param [callbacks] {Object} With the optionnal following keys
238 * @param callback.'execute_reply' {function}
240 * @param callbacks.'execute_reply' {function}
239 * @param callback.'output' {function}
241 * @param callbacks.'output' {function}
240 * @param callback.'clear_output' {function}
242 * @param callbacks.'clear_output' {function}
241 * @param callback.'set_next_input' {function}
243 * @param callbacks.'set_next_input' {function}
242 * @param {object} [options]
244 * @param {object} [options]
243 * @param [options.silent=false] {Boolean}
245 * @param [options.silent=false] {Boolean}
244 * @param [options.user_expressions=empty_dict] {Dict}
246 * @param [options.user_expressions=empty_dict] {Dict}
@@ -291,6 +293,7 b' var IPython = (function (IPython) {'
291 user_expressions : {},
293 user_expressions : {},
292 allow_stdin : false
294 allow_stdin : false
293 };
295 };
296 callbacks = callbacks || {};
294 if (callbacks.input_request !== undefined) {
297 if (callbacks.input_request !== undefined) {
295 content.allow_stdin = true;
298 content.allow_stdin = true;
296 }
299 }
General Comments 0
You need to be logged in to leave comments. Login now