0

I'm trying to write a Chrome Extension to support more powerful tabs (color-coded, split view, floating, background, etc.), but Chrome Extensions don't support the majority of those features, so I was attempting to create a prototype that utilizes IFrames instead, but there are so many safeguards on IFrames these days it's incredibly problematic.

Is there any way to force an iframe to load a page and be treated just as if it were a window? I've already addressed the X-Frame-Options issue, but doing something like loading Gmail from the iframe causes all sorts of JS errors because it's referencing the top window.

If there were some way of embedding a window to be used similarly to an iframe, that would also suffice, but I don't see any way to accomplish that.

I've even tried injecting a script:

window.parent = window;
window.top = window;

But that doesn't seem to resolve the issues either.

darkfrog
  • 1,053
  • 8
  • 29
  • There's no such thing in Chrome. Other browsers like Opera or Firefox provide the SideBar API to extensions which may be helpful here. It was briefly present in Chrome 10 years ago but then it was removed for no good reason. Also, JS can't override window.top as it's an *unforgeable* property per the specification. – wOxxOm Sep 15 '20 at 04:50
  • Would it be possible to create a custom web component or plugin to support something like an IFrame, but is the window top? – darkfrog Sep 16 '20 at 21:23

0 Answers0