sgentle/phantomjs-node — pull request #229 by msk86 (2014-12-24 02:46:32+00:00)
Title: Can pass extra arguments to onResourceRequested which runs in phantomjs scope

Currently, it is impossible to pass any arguments to the first arguments of `page.onResourceRequested`.

With this commit, when we define `page.onResourceRequested`, we can pass more than 2 arguments to the function, the extra ones(from the 3rd) will be passed to the function which can access `request.abort()` as the extra parameters.

The code should look like:
```
page.onResourceRequested(
function(requestData, request, arg1, arg2, arg3) {
request.abort();
console.log(arg1, arg2, arg3); //success!
},
function(requestData) { },
arg1, arg2, arg3
);
```

BTW, this won't break any existing code.