Note that there are some explanatory texts on larger screens.

plurals
  1. POSandbox access violation when using tinyeditor wysiwyg editor in chrome extension
    primarykey
    data
    text
    <p>I'm getting the following error when attempting to load a third party wysiwyg editor in a chrome extension.</p> <blockquote> <p>Sandbox access violation: Blocked a frame at "chrome-extension://cmcjindomengjienigbcldekcfnhfped" from accessing a frame at "null". Both frames are sandboxed and lack the "allow-same-origin" flag.</p> </blockquote> <p>I initially got a similar error and managed to resolve it by adding the <strong>allow-same-origin</strong> flag. This resulted in another error which required the <strong>allow scripts</strong> flag. Below is the current state of the iframe element</p> <pre><code>&lt;iframe sandbox="allow-same-origin allow-scripts" src="editor.html" width="350" height="350" style="border:none;"&gt;&lt;/iframe&gt; </code></pre> <p>The wysiwyg editor creates an iframe dynamically to hold the editor. I'm assuming this might be triggering the second instance of the error. I tried setting the <strong>allow-same-origin</strong> flag on the created iframe in the sandboxed page but this did nothing.</p> <p>I could try an alternative but, as this is also a learning adventure I'd love to solve this issue. </p> <p><strong>EDIT:</strong> I tried replacing the dynamically created iframe with a div just to see what would occur. I didn't get the error above, but as expected the code failed when properties relating to the iframe were accessed. This isn't proof that the new iframe is the problem but it could indeed be.</p> <p><strong>EDIT 2</strong> FWIW, the line below is where the error is thrown</p> <pre><code>this.e = this.i.contentWindow.document; </code></pre> <p>where i was previously initialized as</p> <pre><code>this.i = document.createElement('iframe'); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload