findWidgetNodesByWidgetId
Searches the entire document tree. Returns all widget nodes that match the provided widgetId.
If the manifest contains "documentAccess": "dynamic-page", you must first call figma.loadAllPagesAsync to access this function.
Supported on:
Signature
findWidgetNodesByWidgetId(widgetId: string): Array<WidgetNode>
Parameters
widgetId
The widget ID to search for, which represents unique identifier for the widget.
Remarks
node.widgetId is not to be confused with node.id, which is the unique identifier for the node on the canvas. In other words, if you clone a widget, the cloned widget will have a matching widgetId but a different id.