##// END OF EJS Templates
Added complete method of JS kernel object.
Brian Granger -
Show More
@@ -67,6 +67,18 b' var IPython = (function (IPython) {'
67 }
67 }
68
68
69
69
70 Kernel.prototype.complete = function (line, cursor_pos) {
71 var content = {
72 text : '',
73 line : line,
74 cursor_pos : cursor_pos
75 };
76 var msg = this.get_msg("complete_request", content);
77 this.shell_channel.send(JSON.stringify(msg));
78 return msg.header.msg_id;
79 }
80
81
70 Kernel.prototype.interrupt = function () {
82 Kernel.prototype.interrupt = function () {
71 $.post(this.kernel_url + "/interrupt");
83 $.post(this.kernel_url + "/interrupt");
72 };
84 };
@@ -402,9 +402,11 b' var IPython = (function (IPython) {'
402 var cell = this.cell_for_msg(reply.parent_header.msg_id);
402 var cell = this.cell_for_msg(reply.parent_header.msg_id);
403 if (msg_type === "execute_reply") {
403 if (msg_type === "execute_reply") {
404 cell.set_input_prompt(content.execution_count);
404 cell.set_input_prompt(content.execution_count);
405 } else if (msg_type === "complete_reply") {
406 console.log(content);
405 };
407 };
406 var payload = content.payload || [];
408 var payload = content.payload || [];
407 this.handle_payload(content.payload);
409 this.handle_payload(payload);
408 };
410 };
409
411
410
412
General Comments 0
You need to be logged in to leave comments. Login now