Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin API onunload not being called #8277

Closed
3 tasks done
frostime opened this issue May 16, 2023 · 3 comments
Closed
3 tasks done

Plugin API onunload not being called #8277

frostime opened this issue May 16, 2023 · 3 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

frostime commented May 16, 2023

插件 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

@Vanessa219
Copy link
Member

目前还没想好调用时机,是在卸载或禁用的时候,亦或是其他时候?

@frostime
Copy link
Contributor Author

应该是禁用的时候,卸载应该另外提供别的接口。

以我的为例,我的插件有部分功能需要监听 DOM 的变化,必须才在禁用的时候手动把监听器释放掉。

至于卸载的接口,可以后面在额外加。

@88250 88250 changed the title 插件 API onunload 没有被调用 Plugin API onunload not being called May 17, 2023
@88250 88250 added this to the 2.8.9 milestone May 17, 2023
@Vanessa219
Copy link
Member

卸载的时候也是先需要先禁用再移除,那我就先加在这两个地方吧。

Vanessa219 added a commit that referenced this issue May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants