Skip to main content
Question

Disable console output in iframe embeds

  • December 19, 2023
  • 2 replies
  • 630 views

Hello. My company uses Figma embeds in our design system website and this website also functions as a development environment similar to Storybook. When we are developing on our local machines, the Figma embed dumps a bunch of output to the developer console which I think is inappropriate and very distracting. Is there currently a way to disable this output?

Here’s a screenshot of what I’m talking about:

Looking at the logs, it appears that the Figma dev team is using an abstraction around the window.console method. If that is true, I imagine it’d be easy to support a flag that can be passed via query param on the iframe src URL to disable debug output:

https://www.figma.com/embed?embed_host=share&url=ourFigmaUrl&disableConsole=1

Then in your abstraction you’d look to see if that parameter was truthy and if so skip logging (would probably want to just grab that param once and store it as a global variable or similar on page load for performance reasons). Another option is to add some code in that abstraction that detects if it is being run in an iframe and then skip logging, which I’d be happy with but your team might find less flexible.

2 replies

  • Author
  • 1 reply
  • December 19, 2023

A work around that my coworker just put me on to is this option in Chrome dev tools:

Would still be nice to not have to do this, but it’s good enough for me right now.


Niklas Persson

This would be really appreciated from my point of view as well. Using Storybook as a dev environment and then having figma embeds is really discracting.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings