From 0e18fd7ae2b43e72b2dc7df5219323f644d0210b Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Wed, 17 Jun 2015 11:07:34 -0400 Subject: [PATCH] allow passing a comm_id to new_comm --- notebook/static/services/kernels/comm.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/notebook/static/services/kernels/comm.js b/notebook/static/services/kernels/comm.js index cd10ce4d7..85065ddcb 100644 --- a/notebook/static/services/kernels/comm.js +++ b/notebook/static/services/kernels/comm.js @@ -31,12 +31,14 @@ define([ } }; - CommManager.prototype.new_comm = function (target_name, data, callbacks, metadata) { + CommManager.prototype.new_comm = function (target_name, data, callbacks, metadata, comm_id) { /** * Create a new Comm, register it, and open its Kernel-side counterpart - * Mimics the auto-registration in `Comm.__init__` in the Jupyter Comm + * Mimics the auto-registration in `Comm.__init__` in the Jupyter Comm. + * + * argument comm_id is optional */ - var comm = new Comm(target_name); + var comm = new Comm(target_name, comm_id); this.register_comm(comm); comm.open(data, callbacks, metadata); return comm;