You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This requires an additional pluginId field in the body of the message, and should also allow passing a url to the second argument of post message.
Proposal would be to update sendRaw to get passed the options from creating the API, and add an option field for "pluginId" and "targetOrigin" that user can pass in.
Happy to put together a PR, but wanted to talk through implementation as well. Another option would be just to make it a boolean in options, ie nonNull: true to have the api setup using figma.pluignId to retrieve the ID, and add 'figma.com' as targetOrigin.
Let me know if you have any thoughts. Thanks!
The text was updated successfully, but these errors were encountered:
I'm late to the party, but in case someone else stumbles upon this issue while looking for options:
I rewrote this library for hosted (non-null origin) plugins with some other configuration options. The new package is published as figma-plugin-api on npm: https://www.npmjs.com/package/figma-plugin-api
Figma introduced the ability to run UIs from a hosted non-null origin iframe https://www.figma.com/plugin-docs/creating-ui/#non-null-origin-iframes
This requires an additional
pluginId
field in the body of the message, and should also allow passing a url to the second argument of post message.Proposal would be to update sendRaw to get passed the options from creating the API, and add an option field for "pluginId" and "targetOrigin" that user can pass in.
Happy to put together a PR, but wanted to talk through implementation as well. Another option would be just to make it a boolean in options, ie
nonNull: true
to have the api setup usingfigma.pluignId
to retrieve the ID, and add 'figma.com' as targetOrigin.Let me know if you have any thoughts. Thanks!
The text was updated successfully, but these errors were encountered: