Version 1, Update 40
New:
- Updated
WidgetNode.cloneWidgetto support overriding synced maps. - Added
WidgetNode.widgetIdto provide a way to tell if a widget node belongs to your widget. - Added
figma.pluginIdandfigma.widgetIdfor Plugins and Widgets respectively to get the value of themanifest.json"id" field at runtime. This is useful when paired with various WidgetNode apis as well as working with non-null origin iframes. - Updated
figma.showUIto allow iframes to be positioned within the canvas at a specified x/y coordinate. If the position specified is outside of the user's viewport, the iframe will be moved so that it remains in the user's viewport. - Added
createLinkPreviewAsyncwhich allows Plugin authors to create a link preview from the provided URL. - Added
EmbedNodeandLinkUnfurlNodewhich represent link previews - Add support for drop events in
figma.onas a proposed API. Drop events will trigger when objects outside Figma (such as elements from other browser windows, or files from the local filesystem) are dropped onto the canvas.