Events

View the JS SDK life cycle events.

On this page

loaded

This event may be helpful if you want to write (or include) javascript code before SDK will be loaded by a browser and make some actions when SDK will be available.

/**
 * @param {string} event
 * @param {function} callback
 */
window.addEventListener("langshop:loaded", function() {

    /**
     * LangShopSDK object is defined in the global scope and available now
     *
     * @param {string} event
     * @param {function} callback
     */
    LangShopSDK.on("ready", function() {
        ...
    });
});

ready

The "ready" event needed to indicate when LangShop successfully initialized and ready for user actions.

/**
 * @param {string} event
 * @param {function} callback
 */
LangShopSDK.on("ready", function() {
    ...
});

Report incorrect information

Still Have Questions?

Our customer care team is here for you!

Contact Us