To ensure that your code runs after the RevIQ script is loaded, you can use the
reviq
command queue.
The RevIQ script loads asynchronously in order to not block the page. It’s important to make sure that the API is ready before you call it.
Using Command Queue
Using Promise
Alternatively, you can create a Promise that resolves after the first reviq
command is called.