CLI tool
sdesalas/trifleJS avatar
sdesalas/trifleJS

trifleJS: a headless Internet Explorer with a PhantomJS style API

Headless automation for Internet Explorer

832 stars51 forksJavaScriptMIT

At a glance

What is it?
A Windows executable that drives Internet Explorer through the .NET WebBrowser control and exposes a JavaScript API modelled on PhantomJS. It reached 77 percent of the PhantomJS 1.7 API and stopped there.
Who is it for?
trifleJS suits a team that has to reproduce a site in Internet Explorer, down to the rendering quirks of IE8 through IE11, and that wants to script it with the PhantomJS API many test suites already speak. It does not suit a project that needs mouse and keyboard interaction, file uploads, or WebDriver, since all three are absent and WebDriver was dropped on purpose.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 179 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The .NET WebBrowser control as an automation target

TrifleJS is a headless Internet Explorer browser, and the way it works is unusual. Rather than driving a browser from outside through a protocol, it hosts the .NET WebBrowser class, the same WinForms control that renders HTML in desktop applications, and runs a JavaScript API on the V8 JavaScript Engine next to it. That is the whole reason the project exists: the WebBrowser control is the only way to get Internet Explorer's own rendering and script behaviour, quirks included, into an automated process. The cost is that the target is Windows and only Windows, since the control does not exist on other platforms. The repository reflects that shape, with a C# solution, TrifleJS.sln and TrifleJS.csproj, a Program.cs entry point, an API directory and separate Native, Libs, Utils, Callback and Proxy sources.

The API is a port of PhantomJS 1.7, and it is 77 percent done

The API design decision is that trifleJS mimics PhantomJS, and the README says so bluntly: the API is coded as a port of PhantomJS, so if you have used Phantom before you already know how to use TrifleJS. The port targets version 1.7 of the PhantomJS API, and the README states the reason, namely that WebDriver support added in 1.8 was too much work to take on at that stage and provides only marginal benefit. The coverage figure given is 77 percent, and the README lists what is still missing from the automation: file upload, SSL certificate error handling, mouse and keyboard interaction, and the ChildProcess module. WebDriver support is listed separately as a deliberate omission rather than an oversight. The documentation is broken into the PhantomJS module structure, with pages for command line options, global methods, the phantom object, and the System, FileSystem, WebPage, WebServer and ChildProcess modules.

Command line flags select the IE version and the target page

The tool is driven from the command line, and the flag that matters most is the emulation switch. TrifleJS supports different versions of IE interchangeably depending on which version is installed, and the README notes the inherent limit, that IE9 can emulate IE7, IE8 or IE9 but not IE10. The invocation looks like this:

text
C:\> TrifleJS.exe --emulate=IE8 --render=http://whatbrowser.org/

The --render flag names the page to load and the --emulate flag pins the rendering mode, so the same script can be run against several legacy browser behaviours on one machine. The repository carries an examples directory with two dozen scripts that exercise the API surface, including arguments.js, fibo.js, loadspeed.js, module.js, server.js, staticserver.js, printenv.js and printheaderfooter.js, which is the quickest way to see which parts of the API actually work.

The compatibility matrix is mostly empty cells

The README publishes a unit test breakdown across Windows versions and IE versions, and the pattern in that table is the most useful thing in the document. Windows 7 in both 32 and 64 bit shows 100 percent passing for IE 8, IE 9, IE 10 and IE 11, and 2012R2 shows the same. Everything else is blank, meaning untested, except Windows XP with SP2 under IE 8, which is marked Broken for the build. So the project's own data says the tool is verified on Windows 7 and Windows Server 2012 R2 and nowhere else. The stated ideal installation is Windows 7 with .NET 4.0 or higher using IE11, though the README says it will still run on 32-bit XP with SP2 or on Windows NT kernel releases after 2001.

Downloadable builds, but the project still calls itself beta

The download section offers two archives: a stable v0.4 build and a latest beta v0.5 package, and the instruction for anyone unsure is to take the latest stable one. Above that list sits a line worth quoting in full, that this code is still very much in beta and to check again for updates. The tagged releases visible for the project are v0.3 and v0.4, both published on 2015-01-06, and the roadmap in the README runs from v0.4 at 72 percent of the PhantomJS API through v0.5 in progress, v0.6 targeting all non-WebPage modules, v0.7 the full core API with unit tests, v0.8 CasperJS support, v0.9 testing on Windows platforms after XP SP2, and v1.0 as a point where only minor fixes remain. The licence is MIT, with the licence file in the repository root, and the repository is not archived, with the last push on 2026-04-27.

Embedding a browser versus talking to a browser driver

The alternative worth weighing is not another PhantomJS port but a different architecture. WebDriver based automation, which is the direction PhantomJS itself later moved in, controls a browser through a driver process and a wire protocol, so the browser can run on a separate machine and in a separate process. TrifleJS takes the opposite route and embeds the browser control in its own process, which is why it can reproduce IE's rendering exactly on a Windows host with no driver to install, and also why it cannot run anywhere else and why the authors judged WebDriver support to be too much work. The practical consequence for an evaluation is that trifleJS and a WebDriver setup are not interchangeable. Where you need IE fidelity on Windows and nothing else, the embedded control is the short path. Where you need remote execution, parallelism across machines, or any browser other than IE, the WebDriver route is the only one of the two that reaches.

Editorial conclusion

trifleJS suits a team that has to reproduce a site in Internet Explorer, down to the rendering quirks of IE8 through IE11, and that wants to script it with the PhantomJS API many test suites already speak. It does not suit a project that needs mouse and keyboard interaction, file uploads, or WebDriver, since all three are absent and WebDriver was dropped on purpose. Before adopting, download the stable v0.4 build and run it on the Windows versions you must support, because the published compatibility matrix leaves most platforms untested and the code itself is still described as beta.

Frequently asked questions

What is trifleJS?

TrifleJS is a headless Internet Explorer browser that uses the .NET WebBrowser class with a JavaScript API running on the V8 JavaScript Engine. Its API is a port of the PhantomJS API.

How do I run trifleJS against a specific Internet Explorer version?

Use the --emulate flag, for example TrifleJS.exe --emulate=IE8 --render=http://whatbrowser.org/. The README notes that IE9 can emulate IE7, IE8 or IE9 but not IE10.

How much of the PhantomJS API does trifleJS implement?

The README reports 77 percent of the PhantomJS 1.7 API. Missing pieces include file upload, SSL certificate error handling, mouse and keyboard interaction, and the ChildProcess module, and WebDriver support was left out on purpose.

What are the system requirements for trifleJS?

The ideal installation is Windows 7 with .NET 4.0 or higher and IE11, and the README says it still runs on 32-bit XP with SP2 or on Windows NT based releases after 2001. The published unit test table marks most other platform and IE combinations as untested.

Where do I download trifleJS?

The README links a stable v0.4 archive and a latest beta v0.5 package, and advises taking the latest stable version if you are unsure. It also says the code is still very much in beta.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. sdesalas/trifleJS on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sdesalas-triflejs.svg)](https://hysenlabs.com/projects/sdesalas-triflejs)

Was this useful?