{"action":"created","issue":{"url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/133","repository_url":"https://api.github.com/repos/baudehlo/node-phantom-simple","labels_url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/133/comments","events_url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/133/events","html_url":"https://github.com/baudehlo/node-phantom-simple/issues/133","id":154322578,"number":133,"title":"onLoadFinished arguments wrong with SlimerJS","user":{"login":"awlayton","id":4231765,"avatar_url":"https://avatars.githubusercontent.com/u/4231765?v=3","gravatar_id":"","url":"https://api.github.com/users/awlayton","html_url":"https://github.com/awlayton","followers_url":"https://api.github.com/users/awlayton/followers","following_url":"https://api.github.com/users/awlayton/following{/other_user}","gists_url":"https://api.github.com/users/awlayton/gists{/gist_id}","starred_url":"https://api.github.com/users/awlayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awlayton/subscriptions","organizations_url":"https://api.github.com/users/awlayton/orgs","repos_url":"https://api.github.com/users/awlayton/repos","events_url":"https://api.github.com/users/awlayton/events{/privacy}","received_events_url":"https://api.github.com/users/awlayton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/baudehlo/node-phantom-simple/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-11T19:26:02Z","updated_at":"2016-05-12T15:58:50Z","closed_at":null,"body":"SlimerJS passes 3 arguments to the onLoadFinished callback, while PhantomJS only passes 1.\r\n\r\nIf one registers an onLoadFinished callback taking 1 argument and is using SlimerJS, the callback will be called with an array of the 3 arguments as the first argument.\r\n\r\nI believe the problem stems from [this section](https://github.com/baudehlo/node-phantom-simple/blob/master/node-phantom-simple.js#L631-L637). It appears this issue will happen whenever the callback has one argument but is called with multiple arguments.\r\n\r\nThis is related to johntitus/node-horseman#180\r\n"},"comment":{"url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/comments/218802901","html_url":"https://github.com/baudehlo/node-phantom-simple/issues/133#issuecomment-218802901","issue_url":"https://api.github.com/repos/baudehlo/node-phantom-simple/issues/133","id":218802901,"user":{"login":"puzrin","id":319465,"avatar_url":"https://avatars.githubusercontent.com/u/319465?v=3","gravatar_id":"","url":"https://api.github.com/users/puzrin","html_url":"https://github.com/puzrin","followers_url":"https://api.github.com/users/puzrin/followers","following_url":"https://api.github.com/users/puzrin/following{/other_user}","gists_url":"https://api.github.com/users/puzrin/gists{/gist_id}","starred_url":"https://api.github.com/users/puzrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puzrin/subscriptions","organizations_url":"https://api.github.com/users/puzrin/orgs","repos_url":"https://api.github.com/users/puzrin/repos","events_url":"https://api.github.com/users/puzrin/events{/privacy}","received_events_url":"https://api.github.com/users/puzrin/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T15:58:50Z","updated_at":"2016-05-12T15:58:50Z","body":"@awlayton could you do a PR with test?"}}