Feature request: Add window.postMessage option to button actions

  1. I am embedding a prototype in my website - really great feature! I want to switch back and forward from Figma to my own React app on the click of a Figma button in the prototype, but the Figma content is embedded in a cross-domain iframe so I can’t detect when they click the button.

  2. Please add a simple feature to enable a prototype to send a postMessage (with parameters) to the hosting application to allow cross-communication.

  1. It would be great if this were two way message posting so that the hosting app could make navigation requests of the prototype, so there would need to be further UI in Figma to hook up a global message handler and tie it to multiple navigation actions, depending on the parameters - iframe.postMessage(…‘navigate(Home)’);

With these two fairly simple enhancements, the prototype experience could be extended to seamlessly flow in and out of real UI when embedded in a containing app.

If there is a way for me to write a plugin or something to add this feature, please let me know (for example injecting JavaScript into the prototype).


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.