Gets the value of the specified widget property.
For widgets built with a self-hosted custom element, properties are bound to the element's attributes.
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 { widget } from "@wix/editor";
async function getWidgetProp(propName) {
const response = await widget.getProp(propName);
}