rmariuzzo / react-new-window

🔲 Pop new windows in React, using `window.open`.

Home Page:https://rmariuzzo.github.io/react-new-window/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline code inside <NewWindow> wrapper produces "about:blank" bar in new window

ysageev opened this issue · comments

If you try the simple example in the readme or any other inline code (instead of a URL), the new window shows the "about:blank" bar. How to get rid of it?

image

Clearly, the window isn't "blank". It doesn't matter if I set the window title and window name. I can't get this bar to go away.

For example,

 <NewWindow
      copyStyles={true}
      name="hello"
      features={{ width: 900, height: 600, top: 100, left: 100 }}
      onUnload={this.previewWindowUnload}
      title="Preview"
      center="parent"
 >
                <h1>Inline HTML</h1>
</NewWindow>

...yields the "about:blank".

This is, as far as I'm aware, a browser security restriction, and there's no way to hide that bar in client code. (Consider a malicious site that hides the address bar, and renders its own...)