[Bug]: webagg backend uses non-existent unload event
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #32402 di @kokhlo — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- frontend
Direzione di ricerca
Start at lib/matplotlib/backends/web_backend/js/mpl.js lines 83-85 and inspect how the WebAgg image and websocket lifecycle are connected. Check the browser behavior described in the issue, then determine whether websocket cleanup needs another location. Done means the invalid image unload handler is addressed and the WebAgg websocket behavior remains correct.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug summary
The webagg backend uses the onunload attribute of the image to close the websocket:
https://github.com/matplotlib/matplotlib/blob/c1afaeca985ba7cfce0bfcef40a315f641855456/lib/matplotlib/backends/web_backend/js/mpl.js#L83-L85
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
- Lingua principale
- Python
- Stelle
- 23.5k
- Fork
- 8.6k
- Merge medio
- 1g 19h
- PR unite (30g)
- 64
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di matplotlib/matplotlib
-
[Bug]: Saving a NonUniformImage with bbox_inches="tight" raises TypeError when extent is omittedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
matplotlib/matplotlib#32707 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: withTickedStroke raises ValueError when the line contains NaNForse già presa @RjyavardhanSingh l’ha presa 3 giorni fa. Apertafirst-contribution topic: path handling
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
matplotlib/matplotlib#32689 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Constrained layout raises ZeroDivisionError when the first height/width ratio is zeroForse già presa @yqtian-se l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
matplotlib/matplotlib#32684 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: twin axes ignore the navigation opt-outsForse già presa @NaumanRafay l’ha presa 36 giorni fa. Apertatopic: toolbar
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matplotlib/matplotlib#32528 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: macOS font discovery raises KeyError('_items') for an incomplete system_profiler font recordApertafirst-contribution OS: Apple status: needs clarification topic: text/fonts
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
matplotlib/matplotlib#32328 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di matplotlib/matplotlib
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
nael5x/creative-ai#130 ·
-
Make the "%" unit spacing the same in the web and in A10Forse già presa @kragent66-glitch l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 commento ·
-
ci severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Spackle#205 ·
I maintainer di solito rispondono entro 1 giorno
-
pkg:lgm type:chore upstream-gaussx
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jejjohnson/pyrox#610 ·
I maintainer di solito rispondono entro 1 giorno