[Bug]: webagg backend uses non-existent unload event
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
- #32402 de @kokhlo — fechado sem integrar
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 68/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript
- Domínio
- frontend
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Python
- Estrelas
- 23.5k
- Forks
- 8.6k
- Merge médio
- 1d 19h
- PRs com merge (30d)
- 64
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de matplotlib/matplotlib
-
[Bug]: Saving a NonUniformImage with bbox_inches="tight" raises TypeError when extent is omittedAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
matplotlib/matplotlib#32707 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: withTickedStroke raises ValueError when the line contains NaNTalvez já em andamento @RjyavardhanSingh assumiu há 3 dias. Abertafirst-contribution topic: path handling
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
matplotlib/matplotlib#32689 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Constrained layout raises ZeroDivisionError when the first height/width ratio is zeroTalvez já em andamento @yqtian-se assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
matplotlib/matplotlib#32684 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: twin axes ignore the navigation opt-outsTalvez já em andamento @NaumanRafay assumiu há 36 dias. Abertatopic: toolbar
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
matplotlib/matplotlib#32528 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: macOS font discovery raises KeyError('_items') for an incomplete system_profiler font recordAbertafirst-contribution OS: Apple status: needs clarification topic: text/fonts
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
matplotlib/matplotlib#32328 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de matplotlib/matplotlib
Issues semelhantes
-
[Doc]: Feedback for `/zh-cn/v0.30.0/tutorials/models/Qwen3.6-35B-A3B.html`A3社区配置和基线不一致,社区配置也达不到基线Abertadocumentation
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
vllm-project/vllm-ascend#24429 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
simnJS/AnyPS5#735 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
sqlreview.sh: `remap` with no review draft seeds one, and `delta` prints the diff then exits 2Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
nq-rdl/agent-extensions#623 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
vortex-data/vortex#12633 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
gke-labs/kube-agents#7955 ·
Mantenedores costumam responder em até 1 dia