Commit Graph

269 Commits (1d9c34926579872655ee355ac454bbd3010e5f8e)

Author SHA1 Message Date
Ariya Hidayat 1d9c349265 Make exit() synchronous.
We might still need to find a workaround if this crashes on Windows
(see commit bb355db6).
2011-05-29 00:20:56 -07:00
Ariya Hidayat 5be29972cf WebPage callback for its console message.
See http://code.google.com/p/phantomjs/issues/detail?id=12.

By default, WebPage is "silent" and does not report its console message.
This can be overridden easily, e.g:

  var page = new WebPage();
  page.onConsoleMessage = function (msg) {
    console.log(msg);
  };
  page.open(.....);
2011-05-28 21:16:18 -07:00
Ariya Hidayat e7ca6c0aaf Render the web page using tiling approach.
http://code.google.com/p/phantomjs/issues/detail?id=54

Because Qt software rasterizer has a bug in its fillRect() when
dealing with very big paint device, we split the painting into
smaller-size tiles.
2011-05-28 16:02:48 -07:00
Ariya Hidayat 7594a050e9 Refactor render(), split the buffer rendering to its own function.
This can be useful for issue #15.
2011-05-28 13:51:39 -07:00
Ariya Hidayat ff726de796 Simplify buffer handling in render(). 2011-05-28 13:45:23 -07:00
Ariya Hidayat b1af26ecc0 Support different HTTP operations for loading a page.
http://code.google.com/p/phantomjs/issues/detail?id=88
2011-05-28 02:06:20 -07:00
Ariya Hidayat 7e099abaf2 User-agent is part of WebPage settings, not WebPage object itself. 2011-05-27 22:50:33 -07:00
Ariya Hidayat 2a46ccde8b WebPage object can have settings. 2011-05-27 22:36:34 -07:00
Ariya Hidayat b8fc6558a2 Bring back load-images and load-plugins option. 2011-05-27 20:39:09 -07:00
Ariya Hidayat f5e070d444 Store bootstrap code in its own file. 2011-05-26 02:18:09 -07:00
Ariya Hidayat a65ae9b1a8 Reenable custom network access manager. 2011-05-26 01:56:43 -07:00
Ariya Hidayat 9a2fd4b361 Bring back some default web page settings. 2011-05-26 00:27:55 -07:00
Ariya Hidayat 414a46e921 technews.js: Port to use WebPage object. 2011-05-25 23:37:56 -07:00
Ariya Hidayat 55bb382a1b follow.js: Port to use WebPage object. 2011-05-25 23:28:41 -07:00
Ariya Hidayat f84bef4b38 rasterize.js: Port to WebPage object. 2011-05-25 14:37:58 -07:00
Ariya Hidayat 5da05055cc pizza.js: Port to use WebPage object. 2011-05-25 14:37:25 -07:00
Ariya Hidayat 5f018b32b2 useragent.js: Port to WebPage object. 2011-05-25 14:37:25 -07:00
Ariya Hidayat 838b110e9e direction.js: Port to use WebPage object. 2011-05-25 14:10:35 -07:00
Ariya Hidayat a1f0691311 loadspeed.js: Port to use WebPage object. 2011-05-25 14:04:30 -07:00
Ariya Hidayat df64f60ec9 Use WebPage, not QWebPage, inside Phantom class. 2011-05-25 14:00:20 -07:00
Ariya Hidayat a4b540ef9e Merge branch 'master' of github.com:ariya/phantomjs 2011-05-25 10:58:26 -07:00
Ariya Hidayat 041e827447 Port color wheel example to use WebPage object. 2011-05-25 10:55:25 -07: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
Ariya Hidayat bf495f4d0e Merge pull request #48 from ismasan/url_cycle
Example: Array.prototype.forEachWebPage() for easy loading and processing
2011-05-19 08:36:36 -07:00
Ismael Celis f204a3386e Example: Array.prototype.forEachWebPage() for easy loading and processing of multiple URLs in Phantom.js 2011-05-19 16:25:26 +01:00
Ariya Hidayat 1a6d2c11f8 Merge pull request #47 from Roejames12/master
Fixed issue 106
2011-05-17 06:07:24 -07:00
IceArmy b8042ca5fb Merge remote-tracking branch 'upstream/master' 2011-05-16 23:34:34 -07:00
Roejames12 2345087b21 Fixed issue 106 2011-05-16 23:25:47 -07:00
Ariya Hidayat c105696aca Merge pull request #45 from Roejames12/master
Updated CoffeeScript
2011-05-14 07:31:18 -07:00
IceArmy 73329e73aa Update CoffeeScript to version 1.1.1 2011-05-13 01:10:49 -07:00
Ariya Hidayat 59f7cad5d2 Merge pull request #44 from rgieseke/coffeescript-examples
Update CoffeeScript to version 1.1.1 and some minor fixes to the examples
2011-05-11 08:07:23 -07:00
rgieseke 09519dab6c Use sencha account in follow example. 2011-05-11 16:57:52 +02:00
rgieseke c585107e38 Display tweet index in CoffeeScript example. 2011-05-11 16:52:57 +02:00
rgieseke cd9e3d9647 Use sencha twitter account. 2011-05-11 16:47:55 +02:00
rgieseke 11cc69efa4 Update CoffeeScript to version 1.1.1. 2011-05-11 11:45:23 +02:00
rgieseke 4e0126a803 Use window as recommended in CoffeeScript docs. 2011-05-11 11:42:18 +02:00
Ariya Hidayat e994086878 Merge pull request #43 from Roejames12/master
Did a complete rewrite of the plugin system.
2011-05-08 18:19:33 -07:00
IceArmy 652a3c3c76 Added did_action() to find out how many times a hook has been fired 2011-05-07 00:19:55 -07:00
IceArmy e8d1928ebb Fix tiny error where if script is not called directly (so we import it to use it elsewhere), then Bunch and do_action will not be defined in main script. 2011-05-07 00:19:27 -07:00
IceArmy 8c12af3ce5 Did a complete rewrite of the plugin system!
It is now event based, and is MUCH easier than before to write your plugins!
2011-05-06 23:46:51 -07:00
Ariya Hidayat ceafea109c Merge pull request #42 from detro/master
More stuff to 'gitignore'
2011-05-06 03:28:05 -07:00
Ariya Hidayat 0e1a0c6572 Merge pull request #41 from Roejames12/master
Tons of new updates
2011-05-06 03:26:01 -07:00
IceArmy 4fc9692176 Get list of .pyc plugins as well, that way you can provide only a bytecode plugin with no .py plugin and it'll still load up fine 2011-05-05 15:43:12 -07:00
IceArmy 66dc5625b3 Raise RuntimeError on loadPlugin's KeyError, explaining the problem 2011-05-05 12:24:30 -07:00
IceArmy e3e82648dd Documented run function(s) and passed args in plugincontroller
Reorganize loadPlugins to run any named function with any set of arguments. all dict arguments will be automatically converted to bunches

Put same func hooks into 1 hook that calls different methods (pre and post)
2011-05-04 23:11:18 -07:00
IceArmy 354bb22a68 Add plugin URL to README 2011-05-04 17:59:17 -07:00
IceArmy 5d861ccdf9 Simplify loadPlugin's bunched globals and locals 2011-05-04 16:52:58 -07:00
IceArmy f320d76284 Simplified plugin code
_globals and _locals are now attributed objects like they should be, instead of being a dict (makes it easier to use them)
2011-05-04 16:15:51 -07:00
IceArmy 15c854405e Add flusher to SafeStreamFilter 2011-05-04 12:32:17 -07:00
IceArmy b1d8fd1f8c Add pre/post __init__ hook to Phantom() for more flexibility 2011-05-04 11:11:37 -07:00