Optional
nameUnique subscription name. It helps with diagnosing subscription leaks, via method SubEvent.getStat, and provides additional details during error handling. The name should help identify place in the code where the subscription was created.
Optional
onSubscription-cancel callback, to be notified on subscription explicit Subscription.cancel call, or when cancelled implicitly via SubEvent.cancelAll.
This is mostly for internal usage, and has no protection against errors, should the handler throw any.
Optional
thisCalling / this
context for the subscription callback function.
Standard way of passing in context is this way:
event.subscribe(func.bind(this))
With this option you can also do it this way:
event.subscribe(func, {thisArg: this})
Options that can be passed into method SubEvent.subscribe.