alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

Remove unwrapArray #45

Open vmeurisse opened 11 years ago

vmeurisse commented 11 years ago

This caused API of page.onResourceRequested to change with phantom 1.9.0 (first argument was request, it became an array [request, networkRequest]).

Now use fn.apply to pass arguments as they are received. This ensure that any change in phantomjs is transparently reflected without interference from node-phantom.

NOTE: This change the API of onError and onPrompt which where already affected by this bug. They now get the same parameters as described on https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage.

alexscheelmeyer commented 11 years ago

I like this. It is however a change that would break existing code so I will meditate some more on this.