<abstract> new InAppMessage()
Classes
Members
-
<static, readonly> ClickAction :string
-
Enum to represent valid click actions for messages.
Type:
- string
Properties:
Name Type Default Description NEWS_FEED
string NEWS_FEED URI
string URI NONE
string NONE -
<static, readonly> DismissType :string
-
Enum to represent how messages should be dismissed.
Type:
- string
Properties:
Name Type Default Description AUTO_DISMISS
string AUTO_DISMISS MANUAL
string SWIPE -
<static, readonly> SlideFrom :string
-
Enum to represent valid origins for messages to slide in from.
Type:
- string
Properties:
Name Type Default Description TOP
string TOP BOTTOM
string BOTTOM
Methods
-
removeAllSubscriptions()
-
Remove all event subscriptions from this message.
-
removeSubscription(subscriptionGuid)
-
Remove an event subscription that you previously subscribed to.
Parameters:
Name Type Description subscriptionGuid
string The identifier of the subscription you wish to remove, returned by the method
you initially used to create it. -
subscribeToClickedEvent(subscriber) → {string}
-
Subscribe to receive click events. The subscriber callback will be called whenever this message is clicked by the
user.Parameters:
Name Type Description subscriber
function The callback function to receive click events. This function will be invoked with
no arguments when this message records a click.Returns:
The identifier of the subscription created. This can be passed to removeSubscription
to cancel the subscription.- Type
- string
-
subscribeToDismissedEvent(subscriber) → {string}
-
Subscribe to receive dismissed events. The subscriber callback will be called whenever this message is closed
by the user, or when it's dismissed automatically (depending on the dismissType).Parameters:
Name Type Description subscriber
function The callback function to receive dismissed events. This function will be invoked with
no arguments when this message records a dismissal.Returns:
The identifier of the subscription created. This can be passed to removeSubscription
to cancel the subscription.- Type
- string