Preview

QualarooEventHandlerDocumentationDraft 5Jan2015version

Satisfactory Essays
Open Document
Open Document
272 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
QualarooEventHandlerDocumentationDraft 5Jan2015version
Qualaroo Event Handler Documentation (Draft ­ 5 Jan 2015 version) The eventHandler API Call This adds a callback for a named event. Example: var close_fn = function ( nudge_id ) { if ( console ) { console.warn( 'closed nudge ' + nudge_id ) };

_kiq.push( [ 'eventHandler', 'close', close_fn ] ); The current supported event list is and the callback arguments are listed below. show
The Qualaroo app executes all registered show callbacks on the internal _node_ready_ event only if the the callbacks have not yet executed for this nudge. In other words, it only executes the callbacks on the first visible node of a given nudge. The nudge_id and the node_id are provided as arguments to the callback. nodeRendered
The Qualaroo app executes all registered nodeRendered callbacks on the internal _node_rendered_ event. This occurs after the model has been told by the rendering layer that a node rendering has completely finished. The nudge_id, the node_id, and the container height in pixels are provided as arguments to the callback. submit
The Qualaroo app executes all registered callbacks on the internal _report_ready_ event. This occurs when the the model has prepared information to send back to the server. A serialized list of fields and the nudge_id are provided as arguments to the callback. close
The Qualaroo app executes all registered close callbacks on the internal _nudge_stopped_ event. This occurs whenever a nudge has been stopped or otherwise completed. The nudge_id of the closed nudge is provided as the argument to the callback. The clearEventHandler API Call This removes any callbacks for the named event. Example: _kiq.push( [ 'clearEventHandler', 'close' ] );

This method clears all externally registered callbacks for the named event. See above for a complete listing of event names.

You May Also Find These Documents Helpful

Related Topics