in src/CommandQueue.ts [101:121]
private initCwr(awsRum: AwsRumClientInit) {
this.orchestration = new Orchestration(
awsRum.i,
awsRum.v,
awsRum.r,
awsRum.c
);
// Overwrite the global API to use CommandQueue
window[awsRum.n] = (c: string, p: any) => {
this.push({ c, p });
};
// Execute any queued commands
awsRum.q.forEach((command: Command) => {
this.push(command);
});
// Release the original queue
awsRum.q = [];
}