{"action":"closed","issue":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/2295","repository_url":"https://api.github.com/repos/nwjs/nw.js","labels_url":"https://api.github.com/repos/nwjs/nw.js/issues/2295/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw.js/issues/2295/comments","events_url":"https://api.github.com/repos/nwjs/nw.js/issues/2295/events","html_url":"https://github.com/nwjs/nw.js/issues/2295","id":41891483,"number":2295,"title":"document-end does not always fire on new window","user":{"login":"cperryk","id":1660273,"avatar_url":"https://avatars.githubusercontent.com/u/1660273?v=3","gravatar_id":"","url":"https://api.github.com/users/cperryk","html_url":"https://github.com/cperryk","followers_url":"https://api.github.com/users/cperryk/followers","following_url":"https://api.github.com/users/cperryk/following{/other_user}","gists_url":"https://api.github.com/users/cperryk/gists{/gist_id}","starred_url":"https://api.github.com/users/cperryk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cperryk/subscriptions","organizations_url":"https://api.github.com/users/cperryk/orgs","repos_url":"https://api.github.com/users/cperryk/repos","events_url":"https://api.github.com/users/cperryk/events{/privacy}","received_events_url":"https://api.github.com/users/cperryk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2014-09-04T03:37:42Z","updated_at":"2016-08-31T06:54:40Z","closed_at":"2016-08-31T06:54:40Z","body":"I have a main javascript file that listens for the user to click the main html document and uses gui to open a page, test.html, in a new window, then writes to the new window's document when \"document-end\" is fired. Test.html is simply an empty HTML file, with an empty body element.\r\n\r\nUnfortunately, if I click enough, I'll notice that within 20, there are typically at least a couple cases in which document-end never fires and \"Done!\" is never written to the page.\r\n\r\n<pre>\r\n  $(document).click(function(){\r\n    var win = gui.Window.open('test.html', {\r\n      focus: true\r\n    });\r\n    win.on('document-end',function(){\r\n      win.window.document.write('Done!');\r\n    });\r\n  });\r\n</pre>\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4204165-document-end-does-not-always-fire-on-new-window?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>"}}
{"actor":{"display_login":"nwjs-bot"}}