Search.../

getProps( )

Gets the widget's properties.

Description

The getProps() function returns a Promise that resolves to an object with all of the widget's properties. To use this function on an inner (nested) widget, use getNestedWidget().

Syntax

function getProps(): Promise<Object>

getProps Parameters

This function does not take any parameters.

Returns

Fulfilled - Object with all of the widget's properties.

Return Type:

Promise<Object>

Was this helpful?

Get a widget's properties

Copy Code
1import wixWidget from 'wix-widget';
2
3// ...
4
5wixWidget.getProps()
6 .then(props => {
7 // Code to execute with the props object
8 })
9
10// Props object can be, for example: {country: "us", upperLimit: 7}