{"action":"closed","issue":{"url":"https://api.github.com/repos/amir20/phantomjs-node/issues/534","repository_url":"https://api.github.com/repos/amir20/phantomjs-node","labels_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/534/comments","events_url":"https://api.github.com/repos/amir20/phantomjs-node/issues/534/events","html_url":"https://github.com/amir20/phantomjs-node/issues/534","id":172864637,"number":534,"title":"Disable page evaluation logs?","user":{"login":"blakeandrewwood","id":8361644,"avatar_url":"https://avatars.githubusercontent.com/u/8361644?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeandrewwood","html_url":"https://github.com/blakeandrewwood","followers_url":"https://api.github.com/users/blakeandrewwood/followers","following_url":"https://api.github.com/users/blakeandrewwood/following{/other_user}","gists_url":"https://api.github.com/users/blakeandrewwood/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeandrewwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeandrewwood/subscriptions","organizations_url":"https://api.github.com/users/blakeandrewwood/orgs","repos_url":"https://api.github.com/users/blakeandrewwood/repos","events_url":"https://api.github.com/users/blakeandrewwood/events{/privacy}","received_events_url":"https://api.github.com/users/blakeandrewwood/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/amir20/phantomjs-node/labels/Question","name":"Question","color":"0e8a16"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-24T04:58:29Z","updated_at":"2016-08-24T18:06:01Z","closed_at":"2016-08-24T18:06:01Z","body":"After running evaluate, I seem to be getting a output of javascript errors from the site I'm loading. How do I quiet this output? \r\n\r\nOutput:\r\n```\r\ninfo: [OneID] [%s]:  ERROR Already initialized\r\ninfo: \r\ninfo:   :0 in error\r\n```\r\n\r\nCode:\r\n```\r\n    // Create phantom instance\r\n    return phantom.create(['--ignore-ssl-errors=yes', '--load-images=no'])\r\n    .then(inst => {\r\n      instance = inst;\r\n      return instance.createPage();\r\n    })\r\n\r\n    // Open webpage\r\n    .then(page => {\r\n      sitepage = page;\r\n      return sitepage.open(url);\r\n    })\r\n\r\n    // Get redirected or 'real' url\r\n    .then(status => {\r\n      return sitepage.property('url')\r\n    })\r\n\r\n    // Evaluate webpage\r\n    .then(_url => {\r\n      loadedUrl = _url;\r\n      return new Promise((resolve) => {\r\n\r\n        // Timeout to load javascript content\r\n        let sleep = (timeout) ? timeout : 0;\r\n        setTimeout(function() {\r\n          var evaluate = sitepage.evaluate(function() {\r\n            var html = document.getElementsByTagName('head')[0].innerHTML;\r\n            return html;\r\n          });\r\n          resolve(evaluate);\r\n        }, sleep);\r\n\r\n      });\r\n    })\r\n```"}}
{"actor":{"display_login":"amir20"}}