onDestruct - when is the event fired

I have a situation when i need to detect that a view is no longer active.

Hi. onDestruct fires when component destroyed. For example, when closing the popup window.

Perhaps you need onBlur event that fires when focus is moved out of the view:

http://docs.webix.com/api__ui.view_onblur_event.html

i have views which are no longer in view (not in the DOM) and i need to clean up by destroying them. Is there an easy way to see if they still exist in the DOM?

Destructor already exists inside the methods removeView() and close(). However, you can call the destructor separately.

And yes, there’s an easy way. You can try to call any element via its ID:

if($$(view_id)){ . . . }

Thanks for your continued support.

I ran across a very particular circumstance where the test
" if ($$(view_id)) = true but the view_id is not present in the DOM.

are there circumstances where this can occur?