Retrieve a value from the widget's global state.
The state key.
The value stored for the given key.
Get the tag group from the widget.
The tag group string or undefined.
Access the widget container object.
Access the widget options.
Access the widget service instance.
Retrieve a single element inside the widget placement.
CSS selector string.
The first matching element or null/undefined.
Retrieve all elements inside the widget placement matching the selector.
CSS selector string.
A NodeList of matching elements or undefined.
Load the libraries if required.
Store a value in the widget's global state.
The state key.
The value to store.
Remarks
The Widget SDK provides a set of helper methods for interacting with a UGC widget instance. This SDK allows you to query elements within the widget, access widget options and container, manage widget state, and load required libraries. It is designed to simplify widget integration and customization.