embedding-api-v3-samples icon indicating copy to clipboard operation
embedding-api-v3-samples copied to clipboard

Add sandbox attribute to the iframe element

Open kopecmi8 opened this issue 1 year ago • 0 comments

We would like to use your embed component within our application. The problem is that the iframe created internally by the Viz webcomponent doesn't have the sandbox attribute restriction. More info https://web.dev/sandboxed-iframes/

We would like to have sandbox attribute with allow-scripts allow-same-origin. It shouldn't break the reporting functionality, but it should be safer for use in other applications.

It should only be a one line change in your library:

this._iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin')

kopecmi8 avatar Apr 14 '23 09:04 kopecmi8