Gets the value of the specified widget property.
function getProp(propName: string): Promise<string>
Name | Type | Description |
---|---|---|
propName | string | Name of the property that you want to get. |
Promise<string>
Value of the property.
import { editor, widget } from "@wix/editor";
import { createClient } from "@wix/sdk";
const client = createClient({
host: editor.host(),
modules: { widget },
});
async function getWidgetProp(propName) {
const response = await client.widget.getProp(propName);
}