2011-06-06 00:45:31 +04:00
|
|
|
PhantomJS ([www.phantomjs.org](http://phantomjs.org)) is a headless WebKit with JavaScript API.
|
2010-12-27 06:49:33 +03:00
|
|
|
|
2011-06-06 00:45:31 +04:00
|
|
|
It has **fast** and **native** support for DOM handling, CSS selector, JSON, Canvas, and SVG.
|
2011-01-01 19:44:25 +03:00
|
|
|
|
2011-06-06 00:45:31 +04:00
|
|
|
PhantomJS is cross-platform, it can be compiled for Linux, Windows, FreeBSD, and Mac OS X.
|
|
|
|
Refer to the [build instructions](http://code.google.com/p/phantomjs/wiki/BuildInstructions)
|
2011-01-02 23:21:14 +03:00
|
|
|
for details.
|
2010-12-27 06:49:33 +03:00
|
|
|
|
2011-06-06 00:50:53 +04:00
|
|
|
**Note**: If you are on Mac OS X, [read the notice](http://code.google.com/p/phantomjs/wiki/BuildInstructions#Mac_OS_X)
|
|
|
|
before you start using `brew` or `port` to install Qt and/or PhantomJS.
|
|
|
|
|
2011-06-06 00:45:31 +04:00
|
|
|
PhantomJS scripts can be written in JavaScript or [CoffeeScript](http://jashkenas.github.com/coffee-script/).
|
|
|
|
|
2011-01-02 23:21:14 +03:00
|
|
|
See also [quick start guide](http://code.google.com/p/phantomjs/wiki/QuickStart)
|
|
|
|
and more [advanced examples](http://code.google.com/p/phantomjs/wiki/ServiceIntegration)
|
|
|
|
which show various PhantomJS scripts, covering:
|
2010-12-27 06:49:33 +03:00
|
|
|
|
2011-01-02 23:21:14 +03:00
|
|
|
* getting driving direction
|
|
|
|
* showing weather forecast conditions
|
|
|
|
* finding pizza in New York
|
|
|
|
* looking up approximate location based on IP address
|
|
|
|
* pulling the list of seasonal food
|
|
|
|
* running regression tests from command line
|
|
|
|
* producing PDF version of a Wikipedia article
|
|
|
|
* rasterizing SVG to image
|
2010-12-28 09:59:36 +03:00
|
|
|
|
2011-01-02 23:21:14 +03:00
|
|
|
Do not forget to consult the concise [API Reference](http://code.google.com/p/phantomjs/wiki/Interface).
|
2011-04-10 10:55:09 +04:00
|
|
|
|
2011-06-06 00:50:53 +04:00
|
|
|
PhantomJS is based on [Qt](http://qt.nokia.com). There are two implementations, using C++ and Python.
|
|
|
|
|
2011-06-06 00:45:31 +04:00
|
|
|
If you want to contribute, please read the [Contribution Guide](http://code.google.com/p/phantomjs/wiki/ContributionGuide).
|