How to listen to ticket change

How to listen to ticket change

Hello community,
I created a widget, which checks all departments, if the user has written there as well, as some customer do this.

Overall it works fine, except that I have to refresh the widget tab every time I go to another ticket. How can I listen for that "ticket change" event? I tried App.on and ZOHODESK.Event.on, but only get the error, that both are not a function:

  1.         //Wait until SDK is loaded
  2.         ZOHODESK.extension.onload().then(function (App) {
  3.             // First loading (works)
  4.             loadTicketData();

  5.             // Here I get the error
  6.             App.on("Ticket_Changed", function (data) {
  7.                 loadTicketData();
  8.             });
  9.         });
Attached I send you the full widget file. Any help is much appreciated!