Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Haxe externs for phantomjs
Haxe
tag: v1.6

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/js/phantomjs
.gitignore
Readme.md
build.hxml
bundle.sh
haxelib.xml

Readme.md

phantomjs-hx

phantomjs-hx is a haxe extern for phantomjs.

It contains typedefs and externs for all of the common modules and entities.

A few caveats:

  1. Webpage.evaluate() accepts a callback that executes locally in the virtual browser instance. This virtual instance will not have the Haxe standard lib mappings, so haxe.Log.trace, js.Lib.document, etc. will not be available. See more information on the [phantomjs api](http://code.google.com/p/phantomjs/wiki/Interface#evaluate(function\)). Note that the function cannot return closures or functions, only simple objects. However, the return is fully typed.
  2. I'm including some deprecated features, including the [arg array for phantom](http://code.google.com/p/phantomjs/wiki/Interface#args_(array\)). In future phantomjs versions this may not be present. Use System.args instead.
  3. The require("webpage").create() syntax is not used to create phantomjs objects (e.g. WebPages). Instead, you can simply use the "create" method for the class. (e.g. WebPage.create()), which is an alias for the require("webpage") method.
Something went wrong with that request. Please try again.