{"action":"created","issue":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/6392","repository_url":"https://api.github.com/repos/nwjs/nw.js","labels_url":"https://api.github.com/repos/nwjs/nw.js/issues/6392/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw.js/issues/6392/comments","events_url":"https://api.github.com/repos/nwjs/nw.js/issues/6392/events","html_url":"https://github.com/nwjs/nw.js/issues/6392","id":289214292,"number":6392,"title":"window object return in Window.open callback is undefined","user":{"login":"FahadQurashi49","id":14121797,"avatar_url":"https://avatars1.githubusercontent.com/u/14121797?v=4","gravatar_id":"","url":"https://api.github.com/users/FahadQurashi49","html_url":"https://github.com/FahadQurashi49","followers_url":"https://api.github.com/users/FahadQurashi49/followers","following_url":"https://api.github.com/users/FahadQurashi49/following{/other_user}","gists_url":"https://api.github.com/users/FahadQurashi49/gists{/gist_id}","starred_url":"https://api.github.com/users/FahadQurashi49/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FahadQurashi49/subscriptions","organizations_url":"https://api.github.com/users/FahadQurashi49/orgs","repos_url":"https://api.github.com/users/FahadQurashi49/repos","events_url":"https://api.github.com/users/FahadQurashi49/events{/privacy}","received_events_url":"https://api.github.com/users/FahadQurashi49/received_events","type":"User","site_admin":false},"labels":[{"id":736146849,"url":"https://api.github.com/repos/nwjs/nw.js/labels/WIP","name":"WIP","color":"06e018","default":false},{"id":119614401,"url":"https://api.github.com/repos/nwjs/nw.js/labels/test-todo","name":"test-todo","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":{"login":"rogerwang","id":165401,"avatar_url":"https://avatars0.githubusercontent.com/u/165401?v=4","gravatar_id":"","url":"https://api.github.com/users/rogerwang","html_url":"https://github.com/rogerwang","followers_url":"https://api.github.com/users/rogerwang/followers","following_url":"https://api.github.com/users/rogerwang/following{/other_user}","gists_url":"https://api.github.com/users/rogerwang/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerwang/subscriptions","organizations_url":"https://api.github.com/users/rogerwang/orgs","repos_url":"https://api.github.com/users/rogerwang/repos","events_url":"https://api.github.com/users/rogerwang/events{/privacy}","received_events_url":"https://api.github.com/users/rogerwang/received_events","type":"User","site_admin":false},"assignees":[{"login":"rogerwang","id":165401,"avatar_url":"https://avatars0.githubusercontent.com/u/165401?v=4","gravatar_id":"","url":"https://api.github.com/users/rogerwang","html_url":"https://github.com/rogerwang","followers_url":"https://api.github.com/users/rogerwang/followers","following_url":"https://api.github.com/users/rogerwang/following{/other_user}","gists_url":"https://api.github.com/users/rogerwang/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerwang/subscriptions","organizations_url":"https://api.github.com/users/rogerwang/orgs","repos_url":"https://api.github.com/users/rogerwang/repos","events_url":"https://api.github.com/users/rogerwang/events{/privacy}","received_events_url":"https://api.github.com/users/rogerwang/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-01-17T10:28:03Z","updated_at":"2018-04-07T00:55:24Z","closed_at":"2018-04-05T13:30:08Z","author_association":"NONE","body":"Hello,\r\n\r\nI'm upgrading my app from 0.12.3 to the latest nwjs version 0.27.5 I changed my code of window opening from:\r\n\r\n```\r\nvar eWin:any = nw.Window.open(url, {\r\n                \"inject-js-start\": scriptPath,\r\n                \"inject-js-end\": scriptPath2,\r\n                \"show\": false\r\n         });\r\n```\r\nto:\r\n```\r\n\r\nnw.Window.open(url, {\r\n                \"inject_js_start\": scriptPath,\r\n                \"inject_js_end\": srciptPath2,\r\n                \"show\": false\r\n            }, (eWin: any) => {\r\n                   if(!eWin) return;\r\n            })\r\n```\r\nurl is a remote site url and scriptPath, scriptPath2 are paths to local js files.\r\neWin retrun in callback is undefined, and this warning is shown on the devTools console:\r\n\r\n> Creating sandboxed window, it doesn't have access to the chrome.app API. The chrome.app.window.create callback will be called, but there will be no object provided for the sandboxed window.\r\n\r\nMy OS is Mac OS High Sierra, I'm having same issue on windows 10.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/comments/379420548","html_url":"https://github.com/nwjs/nw.js/issues/6392#issuecomment-379420548","issue_url":"https://api.github.com/repos/nwjs/nw.js/issues/6392","id":379420548,"user":{"login":"rogerwang","id":165401,"avatar_url":"https://avatars0.githubusercontent.com/u/165401?v=4","gravatar_id":"","url":"https://api.github.com/users/rogerwang","html_url":"https://github.com/rogerwang","followers_url":"https://api.github.com/users/rogerwang/followers","following_url":"https://api.github.com/users/rogerwang/following{/other_user}","gists_url":"https://api.github.com/users/rogerwang/gists{/gist_id}","starred_url":"https://api.github.com/users/rogerwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogerwang/subscriptions","organizations_url":"https://api.github.com/users/rogerwang/orgs","repos_url":"https://api.github.com/users/rogerwang/repos","events_url":"https://api.github.com/users/rogerwang/events{/privacy}","received_events_url":"https://api.github.com/users/rogerwang/received_events","type":"User","site_admin":false},"created_at":"2018-04-07T00:55:24Z","updated_at":"2018-04-07T00:55:24Z","author_association":"MEMBER","body":"@james-pellow it's in the chromium repo: https://github.com/nwjs/chromium.src\r\n\r\nUnfortunately we keep all the chromium changes in one patch so the change for this issue is not traceable...\r\nThe fix is to use the same RenderFrameHost upon navigation during the Window.open API call. In longer term we plan to refactor the NW Window API so this would be solved in a better way."}}
{"actor":{"display_login":"rogerwang"}}