Set sandbox on iframe (BrowserFrame)

I need to set the sandbox property on an iframe in a BrowserFrame element. How can I do that?

Regards, Rob

I know it’s not very nice solution but I didn’t find better one yet. You can add sandbox attribute by executing native javascript:

BrowserFrame frame = new BrowserFrame("Vaadin web site", new ExternalResource("")); frame.setId("myId"); JavaScript.getCurrent().execute("document.getElementById('myId').childNodes[0] .setAttribute('sandbox','allow-same-origin allow-forms')"); You need to repeat this operation whenever you change iframe source attribute.