Stuff for working with phantomjs from within Emacs.
This package requires phantomjs v1.5 to be installed. This package does no checking (yet) for that dependancy.
The location of phantomjs can be controlled with the customizaton variable:
which is expanded before being used (so you can use ~ and .. and such like).
Here's some illustrative EmacsLisp:
(defun test-phantom-complete () (elnode-stop 8005) (message "test run done")) (let (phantom-server) (setq phantom-server (phantomjs-server 'servertest 6101 'test-phantom-complete)) (sleep-for 2) ;; Open a url (phantomjs-open phantom-server "http://localhost:8005/talk/stuff/html/index.html" (lambda (status arg) (sleep-for 3) ;; Then exit (phantomjs-exit arg (lambda (status arg) (message "plaintalk exited phantom"))))))
Building the package
Use make to rebuild this package:
make clean all
will produce the appropriately versioned phantomjs tar file which can then be installed (locally) with: