Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d1e4b6f + 9cc0aac commit 9efccb3Copy full SHA for 9efccb3
lib/matplotlib/backends/web_backend/js/nbagg_mpl.js
@@ -7,6 +7,17 @@ var comm_websocket_adapter = function (comm) {
7
var ws = {};
8
9
ws.binaryType = comm.kernel.ws.binaryType;
10
+ ws.readyState = comm.kernel.ws.readyState;
11
+ function updateReadyState(_event) {
12
+ if (comm.kernel.ws) {
13
14
+ } else {
15
+ ws.readyState = 3; // Closed state.
16
+ }
17
18
+ comm.kernel.ws.addEventListener('open', updateReadyState);
19
+ comm.kernel.ws.addEventListener('close', updateReadyState);
20
+ comm.kernel.ws.addEventListener('error', updateReadyState);
21
22
ws.close = function () {
23
comm.close();
0 commit comments