Features

What can you do with SlimerJS?

A scriptable browser

SlimerJS allows you to execute JavaScript outside a classical web browser.

In your JavaScript you can use modules, providing access to many APIs:

  • Read and write files.
  • Load a web page and inspect its content.
  • Act on a web page like a user: click on links, fill in form fields etc. You can then inspect the results, to test them or to retrieve them.
  • Listen for network events, to do network monitoring during the load of a webpage.
  • Taking screenshots of a web page.

Your script is also able to execute CommonJS modules, even those written with the CoffeeScript language! Your main script can be written with CoffeeScript as well. SlimerJS recognizes *.coffee files.

Use latest Javascript language features

In your Slimerjs scripts, benefit latest Javascript features implemented in Firefox, including ECMAScript 6 features: iterators, generators, destructured assignement, Map and WeakMap, "let" keyword, arrow functions, promises etc.

A modern browser with latest HTML5/JS/CSS enhancements

Since SlimerJS is executed on top of Firefox, it supports all the HTML5 standards recently implemented in Firefox, including things like audio, video, WebGL etc.

In fact, SlimerJS is not really stuck to a specific version of Gecko: it can use any recent version of Firefox 38+.

The web page rendering in SlimerJS is strictly identical to the rendering in Firefox.

No problem to launch your web site or your web app that use HTML5 bleeding edge features!

See the download page to know the version of Firefox compatible with the latest release of SlimerJS.

You can go on caniuse.com to see the list of HTML5 features supported by Firefox and you can use in web pages loaded by SlimerJS.

And more...

  • Many modules of the Mozilla Add-on SDK are available and you can import them into your code in the same way as CommonJS modules.
  • SlimerJS is able to load Flash content if the Flash plugin is installed (though the plugin's rendering cannot be seen when taking screenshots).
  • You can use Promises when opening a web page with webpage.open()!

Try SlimerJS for your web projects!

About differences with PhantomJS

APIs of SlimerJS are similar to the APIs of PhantomJS but there are a few differences in their behavior. Some options and a few features are still missing. We're working on it. Feel free to help us to have a full compatibility (see release notes to have the list of missing features).

However, most of scripts for PhantomJS run perfectly well right now with SlimerJS!

Contrary to PhantomJS, SlimerJS is not headless: you see windows and it needs a graphical environment. You can use a tool like xvfb on a Linux/MacOS system to have this headless feature and to execute SlimerJS on Linux boxes that do not have xorg installed.