Sync API
To ensure that your code runs after the RevIQ script is loaded, you can use thereviq
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 Command Queue
index.js
Using Promise
Using Promise
Alternatively, you can create a Promise that resolves after the first
reviq
command is called.index.js