An HSAXElement to watch. Passing an application's element causes matching notifications to bubble up from anywhere in that application's hierarchy (e.g. AXWindowCreated for any window in the app, not just one); passing a specific descendant element scopes the notification to just that element
An event name, or an array of event names, to watch for with the same listener
A function called with the notification name and the accessibility element it applies to
When notification is an array, registration is all-or-nothing: if any one of them fails, none are left registered. Listeners are removed automatically when the watched element is destroyed, or when its application quits, so there is no need to call off in either case (doing so is harmless). A listener registered for uIElementDestroyed is still called for the element's destruction before it is removed.
Register a listener for AX events on a specific element