How to open site by url in the same tab in current window


#1

We are trying to load site from url in the new tab on a current window
by going two ways:
for all:

 atom.workspace.registerOpener (uriToOpen) ->
      if 'cache-studio://terminal-view'==uriToOpen
        return new TerminalView()

first way (iframe)

module.exports =
class TerminalView extends ScrollView
  @content: ->
    @div class: 'ask-stack-result native-key-bindings', tabindex: -1, =>
      @iframe src:'http://localhost:57772/csp/sys/webterminal/index.csp', sandbox='allow-same-origin', width: '100%', height:'100%', frameborder:'0'

and we have no results because site use localstorage (without or with sandbox parameter)
console error:

Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': The document is sandboxed and lacks the 'allow-same-origin' flag. 

second way: (BrowserWindow)

BrowserWindow = require('remote').require 'browser-window'
mainWindow = new BrowserWindow({width: 800, height: 600, frame: true });
mainWindow.loadUrl('http://localhost:57772/csp/sys/webterminal/index.csp')
mainWindow.show()

it’s worked, but open site in new Atom window


How open url in a current tab with worked localstorage?