The handler for a event message.
Please note that the sdk and widget passed are in their interface base form, which may not have all the methods available.Use a local variable to store the sdk and widget in their extended form if you need to access the additional methods.
Type Parameters
P
Example
constsdk = newTecsafeWidgetSDK(); sdk.on(InMessagePing, (e) => { // explicitly don't use `(e, sdk, widget)` here, to use the local variable console.log(e.event, sdk); // if you need to respond to the message, you can still use e.respond() e.respond(OutMessagePong.create({} asany))
The handler for a event message. Please note that the sdk and widget passed are in their interface base form, which may not have all the methods available. Use a local variable to store the sdk and widget in their extended form if you need to access the additional methods.