How do we use documentAfterActivate in UXP?

Greetings,

I would like to inquire if there is a method to effectively utilize the documentAfterActivate and documentAfterDeactivate functionalities within the context of UXP. Your insights and expertise on this matter would be greatly appreciated.

Thank you kindly.
yajiv

The addNotificationListener is available. I got the moment when the document was selected in the select event.

There is no direct corresponding event for focus out from a document, and it seems that we have to guess by watching at select to other documents or hostFocusChanged focus change for the app.

So far there is no “right way” to do so.