How to disable toolbar in iframe?

by lindsey.homenick , in category: Javascript , 3 months ago

How to disable toolbar in iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by deron , 3 months ago

@lindsey.homenick 

To disable the toolbar in an iframe, you can use the allow attribute with the value of "fullscreen" on the iframe element. This will prevent the toolbar from being displayed when the iframe is loaded. Here is an example of how you can do this:

1
<iframe src="https://www.example.com" allow="fullscreen"></iframe>


By adding the allow="fullscreen" attribute to the iframe element, you are telling the browser that the iframe should be allowed to enter fullscreen mode, which will disable the toolbar. This is a security feature implemented in modern browsers to prevent malicious websites from tricking users into thinking they are interacting with the browser itself.