Commit Graph

15 Commits (1.7)

Author SHA1 Message Date
Juliusz Gonera 0ce2974ff7 Include the browser version of CoffeeScript too
This is still needed so that injectJs() methods work with CoffeeScript
and so that the main script file can be in CoffeeScript.

It causes duplication of code and some consideration is needed as to
how we could refactor the old inject code so that it uses modules
underneath. Lots of the module functionality written in JS could replace
the old C++ code (CSConverter, most functions in Utils).

http://code.google.com/p/phantomjs/issues/detail?id=47
2012-07-12 23:14:53 -07:00
Jon Leighton a48770cba3 support for backtraces (part 2).
add a default error handler on all pages. people can override if they
need.
ensure error handler can be removed without errors.

Hack ScriptSourceCode so we can pass in a raw string and not have it
validated as a URL

change source location hint for webpage.evaluate().

http://code.google.com/p/phantomjs/issues/detail?id=166
 Please enter the commit message for your changes. Lines starting
2012-03-17 18:40:41 -07:00
Ivan De Marino 19b32cff0a Refactored and Centralised how we handle the loading of resource files.
* Some code reuse
* Centralised in Utils the loading of resource files
* It is safe to assume, when loading a resource file, that IT'S THERE and IT'S READABLE
* ALSO, I removed the unused 'shims' (we forgot them in there :P)
2011-10-16 20:35:21 +01:00
Ariya Hidayat 34a7389a2c Make Terminal class a real singleton. 2011-08-21 00:47:34 -07:00
Ariya Hidayat d3f10a8e18 Make CSConverter a real singleton. 2011-08-21 00:16:38 -07:00
execjosh dc72101c10 Replace direct usage of stdout and stderr with terminal 2011-08-17 03:15:02 +09:00
IceArmy 7a9e0c8599 Exit on start script error 2011-06-19 13:37:03 -07:00
IceArmy ff3eb34fc1 Maintain consistency across error messages 2011-06-18 00:27:59 -07:00
IceArmy 9ed0c2951e On Coffee convert error, just warn and return nothing.
The reason for this is for consistencies sake. When we have a JavaScript
evaluation error, it shows the error, but doesn't exit the program.
Since we can inject CoffeeScripts as well as JS, it wouldn't be
consistent to exit the program. So we just warn instead.
2011-06-16 21:30:10 -07:00
IceArmy e52ed4a54a Report CoffeeScript compile errors 2011-06-16 17:28:36 -07:00
Ivan De Marino bd18d7c838 More work on "injectJs"
* "injectJs()" now supports ".coffee" input
* "injectJs()" is now available for the "phantom" object as well
* CSConverter is now a singleton embedded in the Utils static class
* The code used by "injectJs()" is now centralised in the Utils static class
2011-06-10 17:08:46 +01:00
Ariya Hidayat d15e097815 Refactor most of functionalities to WebPage object.
This breaks all examples (will be fixed slowly). Some features, e.g.
file upload, are also still regressed.
2011-05-25 10:49:35 -07:00
Ivan De Marino a45b8e8401 Major refactoring of the CPP code into separate classes.
This doesn't add ANY new feature: it's aimed only at separating code into
more manageable pieces.

Maybe it's not perfect yet, but it's a start.
2011-04-08 14:30:50 +01:00
Ivan De Marino f86bc38bc1 Separated the "usage" instructions in a text file, embedded as "resource".
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
2011-03-24 22:43:49 +00:00
Ariya Hidayat 158362ed16 Start to implement support for CoffeeScript. 2011-03-02 00:59:07 -08:00