{"action":"created","issue":{"url":"https://api.github.com/repos/asticode/go-astilectron/issues/133","repository_url":"https://api.github.com/repos/asticode/go-astilectron","labels_url":"https://api.github.com/repos/asticode/go-astilectron/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/asticode/go-astilectron/issues/133/comments","events_url":"https://api.github.com/repos/asticode/go-astilectron/issues/133/events","html_url":"https://github.com/asticode/go-astilectron/issues/133","id":346065131,"node_id":"MDU6SXNzdWUzNDYwNjUxMzE=","number":133,"title":"App has crashed when I closed all window","user":{"login":"Grayon","id":5369707,"node_id":"MDQ6VXNlcjUzNjk3MDc=","avatar_url":"https://avatars1.githubusercontent.com/u/5369707?v=4","gravatar_id":"","url":"https://api.github.com/users/Grayon","html_url":"https://github.com/Grayon","followers_url":"https://api.github.com/users/Grayon/followers","following_url":"https://api.github.com/users/Grayon/following{/other_user}","gists_url":"https://api.github.com/users/Grayon/gists{/gist_id}","starred_url":"https://api.github.com/users/Grayon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Grayon/subscriptions","organizations_url":"https://api.github.com/users/Grayon/orgs","repos_url":"https://api.github.com/users/Grayon/repos","events_url":"https://api.github.com/users/Grayon/events{/privacy}","received_events_url":"https://api.github.com/users/Grayon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"asticode","id":11619296,"node_id":"MDQ6VXNlcjExNjE5Mjk2","avatar_url":"https://avatars1.githubusercontent.com/u/11619296?v=4","gravatar_id":"","url":"https://api.github.com/users/asticode","html_url":"https://github.com/asticode","followers_url":"https://api.github.com/users/asticode/followers","following_url":"https://api.github.com/users/asticode/following{/other_user}","gists_url":"https://api.github.com/users/asticode/gists{/gist_id}","starred_url":"https://api.github.com/users/asticode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asticode/subscriptions","organizations_url":"https://api.github.com/users/asticode/orgs","repos_url":"https://api.github.com/users/asticode/repos","events_url":"https://api.github.com/users/asticode/events{/privacy}","received_events_url":"https://api.github.com/users/asticode/received_events","type":"User","site_admin":false},"assignees":[{"login":"asticode","id":11619296,"node_id":"MDQ6VXNlcjExNjE5Mjk2","avatar_url":"https://avatars1.githubusercontent.com/u/11619296?v=4","gravatar_id":"","url":"https://api.github.com/users/asticode","html_url":"https://github.com/asticode","followers_url":"https://api.github.com/users/asticode/followers","following_url":"https://api.github.com/users/asticode/following{/other_user}","gists_url":"https://api.github.com/users/asticode/gists{/gist_id}","starred_url":"https://api.github.com/users/asticode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asticode/subscriptions","organizations_url":"https://api.github.com/users/asticode/orgs","repos_url":"https://api.github.com/users/asticode/repos","events_url":"https://api.github.com/users/asticode/events{/privacy}","received_events_url":"https://api.github.com/users/asticode/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-31T07:20:54Z","updated_at":"2018-07-31T09:43:28Z","closed_at":null,"author_association":"NONE","body":"> Event: 'window-all-closed'\r\n> Emitted when all windows have been closed.\r\n> \r\n> If you do not subscribe to this event and all windows are closed, the default behavior is to quit the app; however, if you subscribe, you control whether the app quits or not. If the user pressed Cmd + Q, or the developer called app.quit(), Electron will first try to close all the windows and then emit the will-quit event, and in this case the window-all-closed event would not be emitted.\r\n\r\nI think it is because Electron's default event, and app quit.\r\nBut the log said `App has crashed`"},"comment":{"url":"https://api.github.com/repos/asticode/go-astilectron/issues/comments/409161324","html_url":"https://github.com/asticode/go-astilectron/issues/133#issuecomment-409161324","issue_url":"https://api.github.com/repos/asticode/go-astilectron/issues/133","id":409161324,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTE2MTMyNA==","user":{"login":"asticode","id":11619296,"node_id":"MDQ6VXNlcjExNjE5Mjk2","avatar_url":"https://avatars1.githubusercontent.com/u/11619296?v=4","gravatar_id":"","url":"https://api.github.com/users/asticode","html_url":"https://github.com/asticode","followers_url":"https://api.github.com/users/asticode/followers","following_url":"https://api.github.com/users/asticode/following{/other_user}","gists_url":"https://api.github.com/users/asticode/gists{/gist_id}","starred_url":"https://api.github.com/users/asticode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asticode/subscriptions","organizations_url":"https://api.github.com/users/asticode/orgs","repos_url":"https://api.github.com/users/asticode/repos","events_url":"https://api.github.com/users/asticode/events{/privacy}","received_events_url":"https://api.github.com/users/asticode/received_events","type":"User","site_admin":false},"created_at":"2018-07-31T09:43:28Z","updated_at":"2018-07-31T09:43:28Z","author_association":"OWNER","body":"@Grayon you can't run electron code with astilectron. The goal of this project is to write GO code to handle electron, not JS code directly.\r\n\r\nHowever what you're requesting makes sense and I could see a `DoNotQuitWhenAllWindowsClosed` attribute for [Astilectron](https://github.com/asticode/go-astilectron/blob/master/astilectron.go#L69) that listens to `window-all-closed` event, and `preventDefault` when the option is set to `true`.\r\n\r\nWould that fix your issue?"}}
{"actor":{"display_login":"asticode"}}