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