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

Add plugin event bus destroy-protyle #9033

Closed
frostime opened this issue Aug 23, 2023 · 0 comments
Closed

Add plugin event bus destroy-protyle #9033

frostime opened this issue Aug 23, 2023 · 0 comments
Assignees
Milestone

Comments

@frostime
Copy link
Contributor

In what scenarios do you need this feature?

调整宽度的插件在 loaded-protyle 之后会给对应的 protyle dom 添加一个 observer,并且希望在关闭这个文档protyle以后能清理掉不必要的监听。

考虑过监听顶部的 tab 页面,但是听人说监听 tab 无法处理页签替换的情况。

image

目前需要一个新的事件,在文档 proytle 销毁的时候触发。

Describe the optimal solution

添加事件,和 loaded-protyle 想对应,在文档被关闭、替换等 protyle 被销毁的情况下调用。

Describe the candidate solution

No response

Other information

No response

@Vanessa219 Vanessa219 changed the title [前端 API] 增加一个文档protyle关闭的事件 Add plugin event bus destroy-protyle Aug 24, 2023
@Vanessa219 Vanessa219 added this to the 2.10.2 milestone Aug 24, 2023
Vanessa219 added a commit to siyuan-note/plugin-sample that referenced this issue Aug 24, 2023
Vanessa219 added a commit that referenced this issue Aug 24, 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

2 participants