Bug summary
The webagg backend uses the onunload attribute of the image to close the websocket:
|
this.imageObj.onunload = function () { |
|
fig.ws.close(); |
|
}; |
I cannot find any such event for Images, for its parent HTMLElement interface, or for its parent Element class, or even the Node ABC.
The docs for the unload event say that it is only on the global Window interface, with onunload on the body, frameset, and svg elements. It is also not recommended for use.
Code for reproduction
In the browser console:
var img = new Image();
img.on<TAB>
Actual outcome
There is no onunload in the autocomplete in the browser console.
Expected outcome
We should remove the onunload entirely, but I am uncertain as to whether we should be closing the websocket explicitly somewhere else.
Matplotlib Version
main
Matplotlib Backend
WebAgg
Installation
git checkout
Bug summary
The webagg backend uses the
onunloadattribute of the image to close the websocket:matplotlib/lib/matplotlib/backends/web_backend/js/mpl.js
Lines 83 to 85 in c1afaec
I cannot find any such event for
Images, for its parentHTMLElementinterface, or for its parentElementclass, or even theNodeABC.The docs for the
unloadevent say that it is only on the globalWindowinterface, withonunloadon thebody,frameset, andsvgelements. It is also not recommended for use.Code for reproduction
In the browser console:
Actual outcome
There is no
onunloadin the autocomplete in the browser console.Expected outcome
We should remove the
onunloadentirely, but I am uncertain as to whether we should be closing the websocket explicitly somewhere else.Matplotlib Version
main
Matplotlib Backend
WebAgg
Installation
git checkout