Overview

Events are fired from the original <div> and bubble up though the DOM.

skutree.widget.loaded

This event is fired when the widget is loaded and ready to be used.

Note: widget's start loading when they are about to come into the viewport.

const embedId = '61faea41c863f'; // enter your widget's unique embed ID here
const widget = document.querySelector('[data-skutree-embed="' + embedId + '"]');

widget.addEventListener('skutree.widget.loaded', handleWidgetLoaded);

function handleWidgetLoaded(event) {
    console.log(event.detail, event.target);

    // do something
}