Skip to content

Cant't listen event 'tauri://close-requested' or 'tauri://destroyed' #2996

@lity

Description

@lity

1

2

I follow the guide of window.WebviewWindow ( https://tauri.studio/en/docs/api/js/classes/window.WebviewWindow ), everything is OK.
But if I change the event from 'tauri://created' to 'tauri://close-requested' (or tauri://destroyed), the event handler won't be invoked.

What I want to do is to save working data and close other hidden windows after user click 'close' button of the main window.
I have tried listen 'tauri://close-requested' , ' tauri://destroyed' and set window.onbeforeunload, none of them works.

Please help.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions