Closed
Description
插件 API onunload 没有被调用
Is there an existing issue for this?
- I have searched the existing issues
Can the issue be reproduced with the default theme (daylight/midnight)?
- I was able to reproduce the issue with the default theme
Could the issue be due to extensions?
- I've ruled out the possibility that the extension is causing the problem.
Describe the problem
plugin 的 onunload hook 没有被调用,导致一些资源没有被释放。
Expected result
正常调用
Screenshot or screen recording presentation
No response
Version environment
- Version: 2.8.8
- Operating System: win10
- Browser (if used): 无
Log file
无
More information
No response
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
Vanessa219 commentedon May 16, 2023
目前还没想好调用时机,是在卸载或禁用的时候,亦或是其他时候?
frostime commentedon May 16, 2023
应该是禁用的时候,卸载应该另外提供别的接口。
以我的为例,我的插件有部分功能需要监听 DOM 的变化,必须才在禁用的时候手动把监听器释放掉。
至于卸载的接口,可以后面在额外加。
[-]插件 API onunload 没有被调用[/-][+]Plugin API `onunload` not being called[/+]Vanessa219 commentedon May 17, 2023
卸载的时候也是先需要先禁用再移除,那我就先加在这两个地方吧。
🎨 fix #8277