addListener


Purpose

Adds a Browser listener to the list of listeners.

Signature

addListener( listener )

Returns

This method does not return anything.

Parameter

Name Description Type Use
listener Registered to intercept the Browser object's events. undefined required

Callback structure

The Browser listener's callback object can be structured as follows:

{
	onClosed: function(url) { ... },
	onLoadStarted: function(url) { ... },
	onLoadFinished: function(url) { ... },
	onLoadFailure: function(url, {error}) { ... }
}

Methods

Name Description Return type
onClosed

Called when the Browser window is closed.

undefined
onLoadStarted

Called when the browser starts loading the contents of the URL address. Applies for each URL loaded within the browser.

undefined
onLoadFinished

Called once the browser finishes loading the contents of the URL address. Applies for each URL loaded within the browser.

undefined
onLoadFailure

Called if the browser encounters an error while loading the contents of the URL address. Applies for each URL loaded within the browser.

undefined

Related topics

Browser
removeListener
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...