Tracking SVI changes

If you are a developer and for some reason wish to track SVI events below goes a simple code that allows you to do that:


function waitForSviElement() {
    if (typeof svi_method !== "undefined") {
        svi_method.$bus.$on(
            "sviEmit",
            action => {
                console.log("Change was made", action);
            });
    } else {
        console.log("Not loaded yet");
        setTimeout(waitForSviElement, 5);
    }
}
if (jQuery('.svi_wrapper,.woosvi_strap').length > 0)
    waitForSviElement();