Is there any methods to control iframe?

I’m making figma embedded page, and i need to viewing frame of control embedded iframe figma file. I tried to control iframe with frame.contentWindow, but it’s blocked cause of iframe cross-origin policy. Is there any way to control viewing frame programmatically?

Is there any way to control viewing frame programmatically?

No, because of iframe cross-origin policy. That’s a security feature. What do you want to control?

All i want is just navigating the forward / backward, like pressing left / right arrow.

If that’s a prototype, you simply need to click on the iframe and you should get these controls. They are native to Figma prototypes.

Thank’s for your advise. But the project that i gonna make is side by side web page. There’s a text article in the left side, and the figma prototype is in the right side. If user scrolls down the article content, then the figma prototype is automatically navigated to next page, linked to the article scrolling. To make this, I need to control the prototype’s navigation programmatically, without user’s direct input into the iframe. Would it possible?

(I’ve found that frame.contentWindow.postMessage API is eligible for these types of work, but i couldn’t discover what postMessage spec figma embed receives.)

No. Figma has no APIs for this.