skip to main content
OpenEdge Mobile 11.5.1 Updates : Session management updates : JSDOSession methods : unsubscribe( ) method (JSDOSession class)
 
unsubscribe( ) method (JSDOSession class)
Unsubscribes a given event handler function from an event of the current JSDOSession object.
This method throws an exception if the specified event is not supported by the JSDOSession class.
Return type: undefined
Applies to: progress.data.JSDOSession class

Syntax

unsubscribe ( event-name , event-handler [ , scope ] )
event-name
The name of a JSDOSession object event to which you unsubscribe an event handler. See the reference entry for the progress.data.JSDOSession class for a list of available events.
event-handler
A reference to an event handler function that is to be removed from the list of callbacks that are called when the specified event fires.
scope
An optional object reference that defines the execution scope of the event handler function. Specifying the scope is optional in the event subscription. If the event subscription does specify an execution scope, you must specify a matching scope parameter when you call the unsubscribe( ) method to cancel the event subscription.
The unsubscribe( ) method throws an error object if event-name does not identify an event supported by the JSDOSession class (the look up is not case sensitive), if an argument is not of the correct type, or if there is no handler that was subscribed for that event with the same scope as passed to unsubscribe( ).

See also:

progress.data.JSDOSession class, subscribe( ) method (JSDOSession class)