Skip to content

Commit

Permalink
Merge pull request #157 from SylvainCorlay/new_comm
Browse files Browse the repository at this point in the history
Allow passing a comm_id to new_comm
  • Loading branch information
minrk committed Jun 19, 2015
2 parents 719f9ac + 0e18fd7 commit 6902409
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions notebook/static/services/kernels/comm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6902409

Please sign in to comment.