Howdy!
I'm having problems executing a script inside a sandboxes iframe that uses srcdoc.
chrome.scripting.executeScript(
{
target: { tabId: tab.id, allFrames: true },
func: () => {
console.log('code executing');
return Promise.resolve();
},
},
async (results) => {
results.forEach(() => {
console.log('got back!');
});
}
);
This works:
```
<iframe srcDoc="<h1>Hello world!</h1>" style={{ position: 'fixed', zIndex: 9999 }} sandbox=""></iframe>
```
This doesn't work:
```
<iframe srcDoc="<h1>Hello world!</h1>" style={{ position: 'fixed', zIndex: 9999 }} sandbox="allow-scripts"></iframe>
```
Is there something needed on my end (or the iframe end) to make this work? Assume removing sandbox is non-negotiable.
Cheers,
Mike