A headless Internet Explorer browser using the .NET WebBrowser Class with a Javascript API running on the [V8 JavaScript engine](http://en.wikipedia.org/wiki/V8_(JavaScript_engine\)).
The API is coded as a port of PhantomJS. Basically, if you have used phantom before then you already know how to use TrifleJS.
It supports different version of IE interchangeably depending on the current version installed (IE9 can emulate IE7, IE8 or IE9 but not IE10).
C:\> TrifleJS.exe --emulate:IE8 --render:http://whatbrowser.org/
The following is a list of features that have been ported from PhantomJS.
Feature | Status | Notes |
---|---|---|
global | ||
.require() | Yep | Initialises CommonJS modules |
phantom | ||
.version | Yep | |
.exit() | Yep | |
.injectJS() | Yep | |
.libraryPath | Yep | |
.args | Yep | |
webpage | ||
.open(url, callback) | Yep | Callback included |
.render(filename) | Yep | |
.renderBase64(format) | Yep | |
.evaluate(function, arg1, arg2,..) | Yep | |
.evaluateJavaScript(str) | Yep | |
.includeJs(url, callback) | Yep | Callback included |
.injectJs(filename) | Yep | |
#onConsoleMessage | Nope | |
#onError | Nope | |
#onLoadStarted | Yep | |
#onLoadFinished | Yep | |
system | ||
.args | Yep | |
fs | ||
.changeWorkingDirectory() | Yep | |
COMMAND LINE | ||
REPL input | Yep | |
--version | Yep |
##New features
These are additional features added into TrifleJS that are not present in PhantomJS
Feature | Status | Notes |
---|---|---|
COMMAND LINE | ||
--emulate:(version) | Yep | Emulates specific IE versions |
--render:(url) | Yep | Renders a URL to file and quits |
This code is still very much in beta. Check again for updates.
You can download the binary here if you want to play around with the beta version.