on method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

qlik.on(eventName, callback)

Adds listeners for the generic events. Multiple listeners can be added to an event.

Note: Can be overridden by app and global events.

Version history

Introduced Qlik Sense July 2018

Parameters

eventName

Type: String

Name of the event. Can be:

  • error
  • warning
  • closed

callback

Type: Function

Optional.

Callback method. Registers a callback that is executed every time data is returned.

Example

require( ["js/qlik"], function ( qlik ) {
	qlik.on( "error", function ( error ) {
		$( '#popupText' ).append( error.message + "<br>" );
		$( '#popup' ).fadeIn( 1000 );
	} );
	$( "#closePopup" ).click( function () {
		$( '#popup' ).hide();
	} );
    //open apps -- inserted here --
    //get objects -- inserted here --			
} );

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?