How can I detect destroy event for widget. I would like to clear some things, when a widget is destroyed.
Why I need this? On opening window I created a new window in javascript, place div(window) to DOM (document.body). When main window is destroy, I would like to destroy also secondary window and remove all html.
Why I need this? On opening window I created a new window in javascript, place div(window) to DOM (document.body). When main window is destroy, I would like to destroy also secondary window and remove all html.