Commit Graph

75 Commits (2b83a522516af90f14d179699d8b6bdb6b5f74dd)

Author SHA1 Message Date
Ariya Hidayat 2b83a52251 Implement require('webpage').
This is mostly based on Ivan's work, see
https://github.com/ariya/phantomjs/pull/153

window.WebPage still works, it is not recommended and will be
deprecated.

http://code.google.com/p/phantomjs/issues/detail?id=47
2011-09-08 17:32:31 -07:00
Ariya Hidayat 6a79ea7e6d Implement require('fs').
This is mostly based on Ivan's work, see
https://github.com/ariya/phantomjs/pull/153

http://code.google.com/p/phantomjs/issues/detail?id=47
2011-09-08 10:00:07 -07:00
Ariya Hidayat 059e72588c Rename option/config to localToRemoteUrlAccess(Enabled). 2011-09-07 09:27:20 -07:00
Ariya Hidayat cebe64ec31 Config to limit the disk cache size.
Based on the previous patch at https://github.com/ariya/phantomjs/pull/144.

http://code.google.com/p/phantomjs/issues/detail?id=220
2011-09-06 16:33:11 -07:00
Ariya Hidayat 7cd76309e6 Merge pull request #151 from detro/dev-commonjs_fileio
Last API
2011-09-04 21:19:15 -07:00
Ivan De Marino 8c15c80b14 Renamed "fs-shim.js" to "fileystem-shim.js" to ensure name consistency. 2011-09-04 21:26:11 +01:00
mintbridge af71868c23 add basic http auth support to networkaccessmanager, and add the ability to pass the auth credentials in from the command line 2011-09-02 16:35:58 +01:00
Ivan De Marino 715f1a7fc3 Refactored the JS Shims to be isolated in their own file.
Also, refactored some "too cautious" code to load the shim.

PS I don't grasp 100% the point of "Terminal". Wouldn't qDebug() be enough? What am I missing?
2011-09-01 18:06:30 -07:00
Ivan De Marino 3401dd9f78 Refactored the JS Shims to be isolated in their own file.
Also, refactored some "too cautious" code to load the shim.

PS I don't grasp 100% the point of "Terminal". Wouldn't qDebug() be enough? What am I missing?
2011-08-31 23:19:17 +01:00
Ariya Hidayat 8ebd446e58 Merge pull request #145 from detro/master
Comments stuff
2011-08-31 09:27:52 -07:00
Ivan De Marino d8d88a3894 Added "Copyright..." line to files on which I worked on.
I tried to also add/remove based on the git history.
2011-08-31 16:29:40 +01:00
execjosh 3c790d80a8 Migrate command-line argument processing logic to Config 2011-08-28 22:13:57 +09:00
execjosh f5f436160c Migrate page settings to PhantomConfig 2011-08-27 03:02:59 +09:00
execjosh a445b2d7b9 Migrate network access manager settings to PhantomConfig 2011-08-27 03:02:51 +09:00
execjosh 5441f51607 Migrate proxy settings to PhantomConfig 2011-08-27 03:02:43 +09:00
execjosh a75f7c9dc3 Create PhantomConfig and migrate output and script encoding settings 2011-08-27 03:02:35 +09:00
Ariya Hidayat 6fe972d0a8 Implement WebPage's release() function in pure C++. 2011-08-23 18:53:53 -07:00
IceArmy fb93d49a7f Rename page.destroy() to page.release() 2011-08-21 14:12:15 -07:00
Ariya Hidayat 34a7389a2c Make Terminal class a real singleton. 2011-08-21 00:47:34 -07:00
Ariya Hidayat 944056ce4a Remove unused m_convert from Phantom class. 2011-08-20 23:52:23 -07:00
IceArmy 8880edcf78 Remove settings: jsOpenWindows, jsAccessClipboard, siteSpecificQuirksMode
Renamed jsEnabled to javascriptEnabled
2011-08-20 16:49:36 -07:00
IceArmy 33005c3957 Add a few new QWebSettings for page settings.
Among the most useful, is the jsEnabled setting, which allows you to disable JavaScript.
2011-08-19 15:47:34 -07:00
execjosh 4e7d3f1c18 Change javascript property from "encoding" to "outputEncoding" 2011-08-17 04:17:42 +09:00
execjosh 682b3532be Add command-line option to set encoding of starting script 2011-08-17 03:53:56 +09:00
execjosh 6254c84717 Add command-line option to set terminal output encoding 2011-08-17 03:49:12 +09:00
execjosh ca92c9ff84 Allow startup script to set output encoding 2011-08-17 03:18:52 +09:00
execjosh dc72101c10 Replace direct usage of stdout and stderr with terminal 2011-08-17 03:15:02 +09:00
Erik Dubbelboer b1d947dd51 added persistent cookie support 2011-07-19 19:32:42 +02:00
IceArmy 895923603f Fix memory issues by providing a way to truly delete WebPages. #154
Use page.destroy() to delete the page and regain the memory.
2011-07-02 17:08:06 -07:00
Alessandro Portale c86d104c83 Remove obsolete #include <gifwriter.h> 2011-06-30 05:15:43 +02:00
Ariya Hidayat da749624a3 Merge pull request #99 from aportale/Issue_148
Fix crash on exit (Issues #136, #148 and #149)
2011-06-28 18:05:40 -07:00
Alessandro Portale 5acaa6b42d Fix crash on exit (Issues #136, #148 and #149)
Workaround: Apparently, all QWebPages need to be deleted before
the QApplication gets destroyed.
2011-06-29 00:45:12 +02:00
Ivan De Marino a0e1888c2c Moved the "fs" object to be in the global/window space: will not be attached to the "phantom" object anymore.
* Once (and if) we implement support for CommonJS Module Loading, a "require("fs")" will be required.
2011-06-28 21:02:48 +01:00
Ivan De Marino 6b04ee23c1 Introducing File I/O API in PhantomJS.
* This is the  squash of 30 commits, so it's meaty
* Inspired by HammerJS (see https://github.com/senchalabs/hammerjs)
* Not yet 100% complete
* Final aim is to provide a CommonJS/Filesystem compliant API (see http://wiki.commonjs.org/wiki/Filesystem)
2011-06-27 23:14:05 +01:00
Ariya Hidayat f25a7a66e5 Bump the Qt requirement to version >= 4.6.
Also, remove code branch for Qt 4.5.
2011-06-26 21:51:30 -07:00
Ivan De Marino 2895d096ab Adding "--local-access-remote=[yes|no]".
* This will allow local content to access remote content, bypassing the same origin policy.
* It's controllable from the CLI and through the "page.settings" property
* This addresses Issue #28 but only partially: it's still not possible to make _remote content access other remote content on a different origin_.
2011-06-24 15:57:55 +01:00
Ariya Hidayat 8094cdb4e7 Make sure phantom.exit() really exits.
Patch by Alessandro Portale.
2011-06-20 23:24:51 -07:00
IceArmy 69b06da140 Revert "Exit program properly when we call phantom.exit" 2011-06-20 10:14:08 -07:00
Ariya Hidayat 7ba0d6964e Merge pull request #82 from Roejames12/master
Exit program properly when we call phantom.exit
2011-06-19 23:19:44 -07:00
Ariya Hidayat 00810e98b3 Pass source and lineNumber for console redirection.
onConsoleMessage callback can handle two (optional) arguments, e.g.

    page.onConsoleMessage = function (msg, lineNo, source) {
        ....
    };
2011-06-19 21:06:27 -07:00
IceArmy c44838227d Fix bug where phantom.exit wouldn't exit properly 2011-06-19 17:26:39 -07:00
IceArmy 0e765f2a95 Exit program properly when we call phantom.exit
Previously, calling phantom.exit would set the exit code and finish running the
JavaScript until it was done, then exit the program with your code. Basically
it didn't actually exit the program. It caused many code fallthrough problems,
but is now fixed. :)
2011-06-19 01:20:45 -07:00
IceArmy ff3eb34fc1 Maintain consistency across error messages 2011-06-18 00:27:59 -07:00
Ariya Hidayat 6e2b362850 Change scriptLookupDir to libraryPath. 2011-06-17 20:52:19 -07:00
Ariya Hidayat 12c81516cc Never continue if terminated is flagged. 2011-06-17 20:52:13 -07:00
Ariya Hidayat 944afb314e Do not crash when the command line option is unknown.
http://code.google.com/p/phantomjs/issues/detail?id=124
2011-06-17 18:37:01 -07:00
Ariya Hidayat 75bbbebb89 Simplify the logic inside Phantom::execute().
We need to make sure we return quickly if terminated is set to false
(e.g. in the constructor, if something is wrong).
2011-06-17 18:04:20 -07:00
IceArmy 61459fab45 Use phantom.scriptName instead of phantom.args[0] 2011-06-15 14:30:31 -07:00
IceArmy c8c58f11c7 Pass script's filename as arg[0] 2011-06-15 02:57:14 -07:00
IceArmy 309d3b5aaa Allow scriptLookupDir to be set for phantom object 2011-06-12 14:38:34 -07:00