EaxAnalyzer.clearWaitToken

Syntax

clearWaitToken(name);

Parameters

name. Name of the wait token to be reset in the express report. It is defined using an element of the PP.Exp.Operation enumeration.

Description

The clearWaitToken method resets wait token in the express report by the specified name.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). Remove data source change wait token, and clear the data source, or clear all available wait tokens if there is no data source:

var eaxAnalyzer = expressBox.getSource(); 
// Get wait tokens of data source change
var waitToken = eaxAnalyzer.getWaitToken(PP.Exp.Operation.ChangeDataSource);
if(waitToken != null) {
    // Remove wait token of data source change
    eaxAnalyzer.clearWaitToken(PP.Exp.Operation.ChangeDataSource);
    // Clear data source
    eaxAnalyzer.clearDataSources();
    console.log("Express report data source is cleared.")
} else {
    eaxAnalyzer.clearAllWaitTokens();
    console.log("All wait tokens are removed.");
}

After executing the example all the wait tokens are removed from the express report, and the browser console displays an appropriate message:

All wait tokens are cleared.

See also:

EaxAnalyzer