8000 In sandbox mode, window.opener doesn't work when children are from different domain · Issue #8100 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
In sandbox mode, window.opener doesn't work when children are from different domain #8100
Closed
@davidrevmakx

Description

@davidrevmakx
  • Electron version: 1.4.10
  • Operating system: Darwin x64

Expected behavior

When a popup pointed to a different domain from the parent is opened. window.opener should not be null. It is required for many OAuth authentication where the parent and the child (popup) is from different domains.

Actual behavior

When a popup is pointed towards the same domain window.opener is present but when its pointed towards a different domain window.opener is null

How to reproduce

main.js
app.on('ready', () => { console.log("ready"); const win = new BrowserWindow({webPreferences: { sandbox: true }}) win.loadURL('http://localhost:8888/index.html'); })

index.html
<a href="javascript:window.open('https://app.asana.com')">Click here</a>

window.opener is null at app.asana.com because the domain is different from the parent

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0