mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
fix undefined 'session_id' member in kernel.js
This commit is contained in:
parent
1021c3dc88
commit
549cf4ee2a
@ -20,6 +20,10 @@ var IPython = (function (IPython) {
|
|||||||
this.shell_channel = null;
|
this.shell_channel = null;
|
||||||
this.iopub_channel = null;
|
this.iopub_channel = null;
|
||||||
this.running = false;
|
this.running = false;
|
||||||
|
|
||||||
|
this.username = "username";
|
||||||
|
this.session_id = utils.uuid();
|
||||||
|
|
||||||
if (typeof(WebSocket) !== 'undefined') {
|
if (typeof(WebSocket) !== 'undefined') {
|
||||||
this.WebSocket = WebSocket
|
this.WebSocket = WebSocket
|
||||||
} else if (typeof(MozWebSocket) !== 'undefined') {
|
} else if (typeof(MozWebSocket) !== 'undefined') {
|
||||||
@ -34,7 +38,7 @@ var IPython = (function (IPython) {
|
|||||||
var msg = {
|
var msg = {
|
||||||
header : {
|
header : {
|
||||||
msg_id : utils.uuid(),
|
msg_id : utils.uuid(),
|
||||||
username : "username",
|
username : this.username,
|
||||||
session : this.session_id,
|
session : this.session_id,
|
||||||
msg_type : msg_type
|
msg_type : msg_type
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user