{"action":"created","issue":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/2926","repository_url":"https://api.github.com/repos/nwjs/nw.js","labels_url":"https://api.github.com/repos/nwjs/nw.js/issues/2926/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw.js/issues/2926/comments","events_url":"https://api.github.com/repos/nwjs/nw.js/issues/2926/events","html_url":"https://github.com/nwjs/nw.js/issues/2926","id":54103639,"number":2926,"title":"new-win-policy prevent default","user":{"login":"FezVrasta","id":5382443,"avatar_url":"https://avatars.githubusercontent.com/u/5382443?v=3","gravatar_id":"","url":"https://api.github.com/users/FezVrasta","html_url":"https://github.com/FezVrasta","followers_url":"https://api.github.com/users/FezVrasta/followers","following_url":"https://api.github.com/users/FezVrasta/following{/other_user}","gists_url":"https://api.github.com/users/FezVrasta/gists{/gist_id}","starred_url":"https://api.github.com/users/FezVrasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FezVrasta/subscriptions","organizations_url":"https://api.github.com/users/FezVrasta/orgs","repos_url":"https://api.github.com/users/FezVrasta/repos","events_url":"https://api.github.com/users/FezVrasta/events{/privacy}","received_events_url":"https://api.github.com/users/FezVrasta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nwjs/nw.js/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/nwjs/nw.js/labels/test-todo","name":"test-todo","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"rogerwang","id":165401,"avatar_url":"https://avatars.githubusercontent.com/u/165401?v=3","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://avatars.githubusercontent.com/u/165401?v=3","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":15,"created_at":"2015-01-12T20:39:41Z","updated_at":"2016-09-13T08:04:51Z","closed_at":null,"body":"I'm trying to access Google Inbox using a node-webkit app and I/m trying to make my app open every link on the default browser listening for `new-win-policy`, the problem is that when I click on a link it gets opened on the default browser but it gets even opened on a new node-webkit window.\r\n\r\nIs there a way to call some kind of `preventDefault()` on this event?\r\n\r\nThis is the very simple app:\r\n\r\n`````````\r\n<html>\r\n  <head>\r\n    <title>Google Inbox</title>\r\n    <style>\r\n      body {\r\n        margin: 0px;\r\n        overflow: hidden;\r\n      }\r\n      iframe {\r\n        border: 0;\r\n        width: 100%;\r\n        height: 100%;\r\n      }\r\n    </style>\r\n  </head>\r\n  <body>\r\n    <iframe src=\"https://inbox.google.com\" nwdisable nwfaketop></iframe>\r\n    <script>\r\n      var gui = require('nw.gui');\r\n      var win = gui.Window.get();\r\n      win.on('new-win-policy', function (frame, url, policy) {\r\n        gui.Shell.openExternal(url);\r\n        policy.ignore();\r\n      });\r\n    </script>\r\n  </body>\r\n</html>\r\n````````\r\n\r\nThanks!\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7684241-new-win-policy-prevent-default?utm_campaign=plugin&utm_content=tracker%2F51989&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F51989&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/comments/246606328","html_url":"https://github.com/nwjs/nw.js/issues/2926#issuecomment-246606328","issue_url":"https://api.github.com/repos/nwjs/nw.js/issues/2926","id":246606328,"user":{"login":"VoidVolker","id":5086438,"avatar_url":"https://avatars.githubusercontent.com/u/5086438?v=3","gravatar_id":"","url":"https://api.github.com/users/VoidVolker","html_url":"https://github.com/VoidVolker","followers_url":"https://api.github.com/users/VoidVolker/followers","following_url":"https://api.github.com/users/VoidVolker/following{/other_user}","gists_url":"https://api.github.com/users/VoidVolker/gists{/gist_id}","starred_url":"https://api.github.com/users/VoidVolker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VoidVolker/subscriptions","organizations_url":"https://api.github.com/users/VoidVolker/orgs","repos_url":"https://api.github.com/users/VoidVolker/repos","events_url":"https://api.github.com/users/VoidVolker/events{/privacy}","received_events_url":"https://api.github.com/users/VoidVolker/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T08:04:51Z","updated_at":"2016-09-13T08:04:51Z","body":"Yes, for me too. But place `a` into new window page - and you will see, when user click link into this new window. Then it stop working."}}
{"actor":{"display_login":"VoidVolker"}}