alexscheelmeyer/node-phantom — pull request #7 by ghc-marco-ramirez (2012-10-09 20:42:00+00:00)
Title: Fixed onLoadFinished bug and extended evaluate method

I had the same issue as jfeldstein (https://github.com/alexscheelmeyer/node-phantom/issues/6#issuecomment-8874091) so I branched the logic in the open method based on whether a callback is provided. The bridge now either gets a "pageOpen" or "pageOpenWithCallback" request so it can open the page with or without a callback. I had to do this because always opening a page with a callback seems to block the onLoadFinished callback from being called.

I also extended the evaluate method to accept 0 or more arguments to pass to the function being evaluated.