diff --git a/IPython/frontend/html/notebook/static/js/kernel.js b/IPython/frontend/html/notebook/static/js/kernel.js
index b5ec75c..bdebda2 100644
--- a/IPython/frontend/html/notebook/static/js/kernel.js
+++ b/IPython/frontend/html/notebook/static/js/kernel.js
@@ -67,6 +67,18 @@ var IPython = (function (IPython) {
}
+ Kernel.prototype.complete = function (line, cursor_pos) {
+ var content = {
+ text : '',
+ line : line,
+ cursor_pos : cursor_pos
+ };
+ var msg = this.get_msg("complete_request", content);
+ this.shell_channel.send(JSON.stringify(msg));
+ return msg.header.msg_id;
+ }
+
+
Kernel.prototype.interrupt = function () {
$.post(this.kernel_url + "/interrupt");
};
diff --git a/IPython/frontend/html/notebook/static/js/notebook.js b/IPython/frontend/html/notebook/static/js/notebook.js
index 2bbd93d..44ddd07 100644
--- a/IPython/frontend/html/notebook/static/js/notebook.js
+++ b/IPython/frontend/html/notebook/static/js/notebook.js
@@ -402,9 +402,11 @@ var IPython = (function (IPython) {
var cell = this.cell_for_msg(reply.parent_header.msg_id);
if (msg_type === "execute_reply") {
cell.set_input_prompt(content.execution_count);
+ } else if (msg_type === "complete_reply") {
+ console.log(content);
};
var payload = content.payload || [];
- this.handle_payload(content.payload);
+ this.handle_payload(payload);
};