{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom-shell/issues/921","labels_url":"https://api.github.com/repos/atom/atom-shell/issues/921/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom-shell/issues/921/comments","events_url":"https://api.github.com/repos/atom/atom-shell/issues/921/events","html_url":"https://github.com/atom/atom-shell/issues/921","id":52142423,"number":921,"title":"Navigate back to previous page: 'require' is not defined","user":{"login":"amgibson","id":3973764,"avatar_url":"https://avatars.githubusercontent.com/u/3973764?v=3","gravatar_id":"","url":"https://api.github.com/users/amgibson","html_url":"https://github.com/amgibson","followers_url":"https://api.github.com/users/amgibson/followers","following_url":"https://api.github.com/users/amgibson/following{/other_user}","gists_url":"https://api.github.com/users/amgibson/gists{/gist_id}","starred_url":"https://api.github.com/users/amgibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amgibson/subscriptions","organizations_url":"https://api.github.com/users/amgibson/orgs","repos_url":"https://api.github.com/users/amgibson/repos","events_url":"https://api.github.com/users/amgibson/events{/privacy}","received_events_url":"https://api.github.com/users/amgibson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/atom-shell/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-12-16T17:31:22Z","updated_at":"2015-01-21T23:08:13Z","closed_at":null,"body":"Reproducible on Windows Atom-Shell 0.19.1 and 0.20.0\r\n\r\nTo reproduce:\r\n\r\nUsing the quick-start app as a starting point, replace index.html with\r\n\r\n````HTML\r\n<html>\r\n<head>\r\n  <title>First page</title>\r\n</head>\r\n<body>\r\n  <script>\r\n    require('ipc');\r\n  </script>\r\n  <p>\r\n    Click on the link\r\n  </p>\r\n  <a href=\"next.html\">Link</a>\r\n</body>\r\n</html>\r\n````\r\n\r\nand add a second file next.html containing\r\n\r\n````HTML\r\n<html>\r\n<head>\r\n  <title>Second page</title>\r\n</head>\r\n<body>\r\n  <script>\r\n    require('ipc');\r\n  </script>\r\n  <p>\r\n    Now press backspace to go back to the previous page\r\n  </p>\r\n</body>\r\n</html>\r\n````\r\n\r\nRun the app and follow the instructions on the pages. When going back to the first page, the following error appears on the console:\r\n\r\n> Uncaught ReferenceError: require is not defined\r\n\r\nI expected `require` to be defined, as it was on the first visit to the page.\r\n\r\nI added some tracing to resources/atom/renderer/lib/init.js and it appears that `process.argv` contains `--node-integration=true` on the first visit to each page. However, it doesn't contain that argument when going back to the first page. This means that `nodeIntegration` is then `false` and so the code which sets `global.require` (later in the same file) is skipped."},"comment":{"url":"https://api.github.com/repos/atom/atom-shell/issues/comments/70940883","html_url":"https://github.com/atom/atom-shell/issues/921#issuecomment-70940883","issue_url":"https://api.github.com/repos/atom/atom-shell/issues/921","id":70940883,"user":{"login":"jimmcslim","id":285469,"avatar_url":"https://avatars.githubusercontent.com/u/285469?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmcslim","html_url":"https://github.com/jimmcslim","followers_url":"https://api.github.com/users/jimmcslim/followers","following_url":"https://api.github.com/users/jimmcslim/following{/other_user}","gists_url":"https://api.github.com/users/jimmcslim/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmcslim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmcslim/subscriptions","organizations_url":"https://api.github.com/users/jimmcslim/orgs","repos_url":"https://api.github.com/users/jimmcslim/repos","events_url":"https://api.github.com/users/jimmcslim/events{/privacy}","received_events_url":"https://api.github.com/users/jimmcslim/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T23:08:13Z","updated_at":"2015-01-21T23:08:13Z","body":"Have tested the new release 0.20.7 and this is still an issue on Windows. Is it by design... is there something my app should do when a window navigates to a URL?"}}