Is it possible to have a code/function that executes before a custom on-panel widget is opened?
For example I want it to hook a button in the Map's popup that will then call the widget if it's not open.
A off-panel widget or external configuration wouldn't be ideal, I need this to be inside the Widget's scope and keep it modular.