Skip to content

Supported Web Standards

ariya edited this page Jan 5, 2013 · 2 revisions

PhantomJS uses QtWebKit. It supports many features which are part of http://trac.webkit.org/wiki/QtWebKitFeatures22.

Unsupported Features

Support for plugins (such as Flash) has been dropped a long time. The primary reasons:

  • Pure headless (no X11) makes it impossible to have windowed plugin
  • Issues and bugs are hard to debug, due to the proprietary nature of such plugins (binary blobs)

The following features, due to the nature of PhantomJS, are irrelevant.

WebGL would require OpenGL-capable system. Since the goal of PhantomJS is to become 100% headless and self-contained, this is not acceptable. Using OpenGL emulation via Mesa can overcome the limitation, but then the performance would degrade.

Video and Audio would require shipping a variety of different codecs implementation.

CSS 3-D needs a perspective-correct implementation of texture mapping. It can't be implemented with a penalty in performance.

Each of the above feature may be supported in the future if the technical challenges associated with the implementations are solved. Until then, do not rely on those features.

Not Tested Features

XPath.

Detecting Features

Using WebKit version and compare it against other WebKit-based browser is not encouraged. The reason is because every WebKit implementation may have varying support due to its architecture of having interface/ abstraction layer.

The best way to find out if a certain feature is supported or not is via feature detection, for example by using a library like Modernizr. The included examples/features.js illustrates the use of Modernizr and dumps all the detected features, both supported and not supported.

Please note that although a certain feature might be supported, there is no really guarantee that it is 100% supported. You still have run your own extensive tests to make sure that the support level is up to what you need.