Skip to content

Commit 2b241cf

Browse files
committed
Fix the onload callback as found by @andreabedini in #2310
1 parent 3b26e2d commit 2b241cf

File tree

1 file changed

+2
-2
lines changed
  • lib/matplotlib/backends/web_backend

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/web_backend/mpl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ function figure(fig_id, websocket_url_prefix, parent_element) {
4343
init_mpl_toolbar(this);
4444

4545
this.ws.onopen = function () {
46-
this.ws.send(JSON.stringify(
46+
this.send(JSON.stringify(
4747
{type: 'supports_binary',
48-
value: this.supports_binary}));
48+
value: fig.supports_binary}));
4949
}
5050

5151
fig = this

0 commit comments

Comments
 (0)