skip to main content
OpenEdge Mobile 11.5.1 Updates : Session management updates : JSDOSession methods : subscribe( ) method (JSDOSession class)
 
subscribe( ) method (JSDOSession class)
Subscribes a given event handler function to 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

subscribe ( event-name , event-handler [ , scope ] )
event-name
The name of an event on a JSDOSession object to which you subscribe 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 called when the specified event fires.
scope
An optional object reference that defines the execution scope of the event handler function called when the event fires. If the scope property is omitted, the execution scope is the global object (usually the browser or device window).
The subscribe( ) 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), or if an argument is not of the correct type.

See also:

unsubscribe( ) method (JSDOSession class)