fix(webview):修复页面关闭时未正确移除消息监听器的问题
- 在页面关闭时移除对 HTML 的消息监听器 - 确保 UUID 相关的监听器被正确清理 - 防止因未清理监听器导致的内存泄漏问题
这个提交包含在:
父节点
28a3df495c
当前提交
d7ffd228b7
@ -64,6 +64,7 @@ export struct XWebview {
|
|||||||
if (this.closeTag !== undefined) {
|
if (this.closeTag !== undefined) {
|
||||||
SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.XWebViewCLose, this.closeTag)
|
SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.XWebViewCLose, this.closeTag)
|
||||||
}
|
}
|
||||||
|
XWebManager.removeOnMessageToWeb(this._uuidToHtml)
|
||||||
XWebManager.removeOnMessage(this._uuid)
|
XWebManager.removeOnMessage(this._uuid)
|
||||||
XWebManager.removeOnMessageToHtml(this._uuidToHtml)
|
XWebManager.removeOnMessageToHtml(this._uuidToHtml)
|
||||||
if (this._uuidToHtml) {
|
if (this._uuidToHtml) {
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户