getNestedWidget()

Note: This function is supported only on Blocks widgets.

Gets the Widget API scoped to an inner (nested) widget.

This function lets you use Widget API functions on inner (nested) widgets. It receives a selector of an inner widget and returns a promise that resolves with an object representing the scope of the inner widget.

Syntax

Copy

Parameters

NameTypeDescription
selectorstringA string of one or more nested widget selectors, which can include a few levels of nesting from outer to inner, separated by spaces. For example: "#nestedWidget1", or "#nestedWidget1 #nestedWidget2".

Returns

Promise<object>

Object representing the scope of the inner widget.

Example

Copy
Did this help?