subscribe( ) method (JSDOSession class)
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Subscribes a given event callback
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
|
- event-name
- A
stringthat specifies the name of an event on aJSDOSessionobject 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
scopeproperty 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.