Commit Graph

489 Commits (c8046c0c65166607cb04f5af9a1538bfc90965d6)

Author SHA1 Message Date
rgieseke 2c8e9bd5b4 Examples: new coffeescript versions. 2011-06-16 22:56:06 +02:00
Ariya Hidayat 1c94da0daf Merge pull request #75 from detro/master
sleepsort.js - it's so silly, it has to go in :P
2011-06-16 09:02:36 -07:00
Ivan De Marino e2ee86e0ac Minor cleanup on 'sleepsort.js' 2011-06-16 14:48:41 +01:00
Ivan De Marino d00ed3f2fc sleepsort.js - This must go in for 1.2 :P
* It's so silly, it has to.
* Also, it shows how "powerful" the function scoping is
2011-06-16 11:46:10 +01:00
Ariya Hidayat 8908fda663 Merge pull request #74 from Roejames12/master
Script filename as phantom.scriptName
2011-06-15 19:10:50 -07:00
IceArmy 61459fab45 Use phantom.scriptName instead of phantom.args[0] 2011-06-15 14:30:31 -07:00
IceArmy fb99a4868d Merge branch 'master' of https://github.com/ariya/phantomjs 2011-06-15 03:01:10 -07:00
IceArmy c8c58f11c7 Pass script's filename as arg[0] 2011-06-15 02:57:14 -07:00
Ariya Hidayat da34ca2d04 Merge pull request #73 from franciscosouza/master
Added entry point (console script)
2011-06-14 22:00:55 -07:00
Francisco Souza 9347cc6fff Created script for running pyphantomjs after install
e.g.: $ pyphantomjs <file>
2011-06-14 19:21:03 -03:00
Ariya Hidayat 6b28a956ac Refer to function argument 'startTime', not from page. 2011-06-13 08:11:40 -07:00
Ariya Hidayat 71f248311f Merge pull request #72 from Roejames12/master
Some bugfixes
2011-06-12 19:41:45 -07:00
IceArmy 309d3b5aaa Allow scriptLookupDir to be set for phantom object 2011-06-12 14:38:34 -07:00
IceArmy 25ac6d35ca phantom.injectJs should use the starting scripts directory, not the app directory 2011-06-12 14:04:07 -07:00
IceArmy 233e8cfff9 Fix 'local variable referenced before assignment' in coffee2js() 2011-06-12 13:53:15 -07:00
IceArmy 19b5b31781 Properly load plugins from the app directories plugins subfolder, not from our CWD 2011-06-12 12:50:16 -07:00
Ariya Hidayat a55d5af8c1 Merge pull request #71 from Roejames12/master
Get up to date
2011-06-12 02:14:31 -07:00
IceArmy 99473110df Merge branch 'master' of https://github.com/ariya/phantomjs 2011-06-12 01:40:18 -07:00
IceArmy 985593221f Re-fix commit 3c665681 2011-06-12 01:38:30 -07:00
IceArmy 6c57775e63 Regenerate resources 2011-06-12 01:23:29 -07:00
IceArmy 6056bc0fa9 Added support for 'injectJs' and 'includeJs'
Updated bootstrap.js to latest. Also contains:
- Fix reference to handlers in onResourceReceived
- Private handlers
- Use closure to make 'handlers' really private.
- Handle onAlert event just like the other events.
- Handle 'onConsoleMessage' event just like the other events.
2011-06-12 01:23:15 -07:00
IceArmy a83d98b654 When sys.exit'ing, don't bother using qCritical, but just sys.exit with the message instead 2011-06-12 01:20:53 -07:00
Ariya Hidayat 693d1c5f23 Handle 'onConsoleMessage' event just like the other events. 2011-06-11 17:16:49 -07:00
IceArmy 953af14544 Merge branch 'master' of https://github.com/ariya/phantomjs 2011-06-11 16:49:03 -07:00
Ariya Hidayat d92723bd29 Handle onAlert event just like the other events. 2011-06-11 16:05:53 -07:00
Ariya Hidayat f6c55010b9 Use closure to make 'handlers' really private. 2011-06-11 03:51:08 -07:00
Ariya Hidayat 3cf4507b13 Merge pull request #70 from lautis/fix-onresourcereceived
Fix reference to handlers in onResourceReceived
2011-06-11 03:36:49 -07:00
Ville Lautanala 0aae7361af Fix reference to handlers in onResourceReceived 2011-06-11 11:52:34 +03:00
IceArmy 5ba2bb4e2f Implement cross platform way of finding the Qt4 plugins directory 2011-06-11 01:28:16 -07:00
IceArmy e32ea74eaf Properly work with any directory
Add imageformats folder and dependencies QtXml and QtSvg, to fix problem where files of type jpeg, gif, svg, .., were not supported
Copy directories examples, plugins, over on build.
Copy files README.md, LICENSE, over on build.
2011-06-10 21:17:10 -07:00
Ariya Hidayat a5885abcbf Merge pull request #65 from detro/utilities
Adding support for "injectJs" and "includeJs"
2011-06-10 10:53:18 -07:00
Ivan De Marino 45afda296f Merge branch 'utilities' of https://github.com/detro/phantomjs into utilities 2011-06-10 17:09:21 +01:00
Ivan De Marino 22ee075cc2 Removing "page.click()" for now.
There is need for a discussion to decide how to do this.
2011-06-10 17:08:46 +01: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
Ivan De Marino cc45aa7f38 Normalie user-provided script path 2011-06-10 17:08:46 +01:00
Ivan De Marino 75403737c4 Added "includeJs()" to "page".
* It includes a script in the page
* It uses a callback to ensure any code dependent on the include runs afterwards
* It uses the signal "javaScriptAlertSent" to do the trick (is there another way to be notified of the "onLoad" event from outside the page context?)
* It uses a "private" slot "_appendScriptElement" to pass the script url in the page context (is there a better way?)
2011-06-10 17:08:46 +01:00
Ivan De Marino 11c8322718 Renaming "page.handlers" to "page._handlers": more common for "private" stuff. 2011-06-10 17:08:46 +01:00
Ivan De Marino a0f8f2491d "loadJsFile()" -> "injectJs"
* According to Issue #32 (http://code.google.com/p/phantomjs/issues/detail?id=32) I added a "lookup logic" that searchs for the file following those steps:
*# Search for file at given path (relative to PWD or absolute - no difference)
*# Is file there? Inject it
*# Is file not there? Try looking for it in "scriptLookupDir"
*# Is file there? Inject it
*# Is file not there? abort
* "scriptLookupDir" is an extra property for WebPage, that, as by it's name, defines a place where to look to script to inject
* Script can alter the scriptLookupDir, if they want
* Updated "injectme.js" accordingly
2011-06-10 17:08:45 +01:00
Ivan De Marino 52677f4f01 Removing "page.click()" for now.
There is need for a discussion to decide how to do this.
2011-06-10 16:53:11 +01:00
Ivan De Marino bf3aa06e19 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 16:50:49 +01:00
Ivan De Marino 7a4ea47c1d Normalie user-provided script path 2011-06-09 18:07:37 +01:00
Ivan De Marino 7be25c9a13 Added "includeJs()" to "page".
* It includes a script in the page
* It uses a callback to ensure any code dependent on the include runs afterwards
* It uses the signal "javaScriptAlertSent" to do the trick (is there another way to be notified of the "onLoad" event from outside the page context?)
* It uses a "private" slot "_appendScriptElement" to pass the script url in the page context (is there a better way?)
2011-06-09 16:11:39 +01:00
Ivan De Marino e5a1f32193 Merge branch 'utilities' of https://github.com/detro/phantomjs into utilities 2011-06-09 11:58:49 +01:00
Ivan De Marino bb0b820f72 Merge remote-tracking branch 'upstream/master' into utilities 2011-06-09 11:50:54 +01:00
Ariya Hidayat 9d12d35478 Merge pull request #69 from Roejames12/master
Latest updates
2011-06-09 01:39:28 -07:00
IceArmy 0bfd28e67d example/netsniff.coffee: Format the output to HAR 1.2 specification. 2011-06-09 00:58:03 -07:00
IceArmy 6a8da550cb Better timing for onResourceRequested and onResourceReceived.
We record the time right inside the network access manager. This gives
better accuracy than doing it from JavaScript side, no loss due to the
latency of signal slot connection.
2011-06-09 00:30:55 -07:00
IceArmy 5ca07d99ba Expose more properties for onResourceRequested and onResourceReceived. 2011-06-09 00:30:55 -07:00
Ariya Hidayat c2c6cbc287 example/netsniff.js: Format the output to HAR 1.2 specification. 2011-06-08 23:47:14 -07:00
Ariya Hidayat 751e471068 Better timing for onResourceRequested and onResourceReceived.
We record the time right inside the network access manager. This gives
better accuracy than doing it from JavaScript side, no loss due to the
latency of signal slot connection.
2011-06-08 23:32:14 -07:00