Also:
* I added a couple of "qFatal" where it makes sense.
* Usage now mentions the fact that the input files that finish by ".coffee" are also acceptable
Also:
* I added a couple of "qFatal" where it makes sense.
* Usage now mentions the fact that the input files that finish by ".coffee" are also acceptable
http://code.google.com/p/phantomjs/issues/detail?id=17
Adding a new phantom property called "paperSize". It takes one of
the two possible dictionary variants:
{ width: '200px', height: '300px', border: '0px' }
{ format: 'A4', orientation: 'portrait', border: '1cm' }
- If no paperSize is defined, the size is defined by the web page
- supported dimension units are: mm, cm, in, px. No unit means px.
- border is optional and defaults to 0.
- supported formats are: A3, A4, A5, Legal, Letter, Tabloid
- orientation (portrait|landscape) is optional and defaults to portrait
I'm considering implementing a short form like:
phantom.paperSize = 'A4';
...needs further investigation.
Cache scripts using phantom.loadScript. Not much speed improvement, but when you're loading a coffee script, there is a huge speed improvement as the converted script is already cached and doesn't need to be re-compiled.
Revert phantom.render (function is supposed to return true on success!)
* "phantom.loadJs()" loads a JS file and executes it's content within the current Document Context. It's synchronous.
* "phantom.includeJs()" adds a <script> tag include. It's asynchronous and accepts as second parameter a "callback", fired when the js file has been loaded.
* Some more qDebug() calls
* qDebug() output disabled by default in the .pro file
NOTE: I'm adding qDebug() calls to make development of phantomjs easier and "debuggable"
* 'phantom.simulateMouseClick' accepts a 'selector' and clicks on every element that matches the selector
* Added a couple of 'qDebug()' to help debugging PhantomJS
* Now the "usage" shows all the options that are currently supported by phantomjs from the command line
* The default behaviour for the option "--load-plugins" is now fixed (to "no")
For example, the argument to allow file upload now is part of
phantomjs invocation:
phantomjs --upload-file tag=/path/to/file script.js A B C
which means script.js only "sees" A, B, C in phantom.args array.
pass --upload-file fileTag=/path/to/file as an argument and set the file of <input type="file" id="foo"/> by calling phantom.setFormInputFile(document.getElementById('foo'), 'fileTag');