Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Major refactoring #24

Merged
merged 15 commits into from
Apr 10, 2011
Merged

Major refactoring #24

merged 15 commits into from
Apr 10, 2011

Conversation

detro
Copy link
Collaborator

@detro detro commented Apr 9, 2011

This branch addresses different issues, but it's mainly focused on Issue #85.

Also, It introduces a new "Network Access Manager": that goes against Issue #2 and Issue #45.

In here I also (by mistake) added a new example, called 'browsermode.js': this script should help to use PhantomJS in a more 'browser-ish' mode, but it's not there yet. Possibly because of stuff like Issue #67 and Issue #26.

I do have to apologize though: this should have been splitted in at least 3 different branches.

Let me know what do you think.

detro added 15 commits March 1, 2011 12:09
* 'phantom.simulateMouseClick' accepts a 'selector' and clicks on every element that matches the selector
* Added a couple of 'qDebug()' to help debugging PhantomJS
* "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"
…rce".

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
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.
The new Network Access Manager currently is designed to do just logging:
- logs HTTP Method type
- logs HTTP Destination URL

The new 'browsermode':
It's in "/examples" and make PhantomJS do just a call to "open(url)".
It has a companion shell script to help with the task.

Also, improvement for Message Handler:
messages are now prefixed with ISO Datetime.
I always forget that the Pre-Compiler passes only once.
@ariya ariya merged commit 8ed9dc1 into ariya:master Apr 10, 2011
@ariya
Copy link
Owner

ariya commented Apr 10, 2011

Looks good, thanks! I have to amend some parts due to various reasons (check the upstream master).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants