only tested with PhantomJS 1.9+