1. Passing JavaScript eval and other related actions to the CurrentFrame, not the MainFrame.
2. Added different methods to navigate between frames
3. With a call to "window.frames[0].focus()", the "currentFrame" changes: commands after that are sent to the new frame under focus.
4. The navigation between frames allows to walk over the "tree of frames" contained in the page.
This commit also adds examples (both in JS and CoffeeScript) and Unit Test.
http://code.google.com/p/phantomjs/issues/detail?id=573
The callback is harmless: if the user registers a "page.onCallback = [Function]",
that will receive any JS type passed via "phantomCallback()".
Also, if the handler for ".onCallback" returns a value, that is passed back as a
return value of "phantomCallback()".
Also, added "page.onConfirm" and "page.onPrompt".
This solves [Issue #133](http://code.google.com/p/phantomjs/issues/detail?id=133).
This is useful in case:
* we don't care about the result of the evaluate
* we don't need to have the result of the evaluate on the spot
* we need the stack of execution to begin WITHIN the page
Also, linting code: everyone should use a linter when writing Javascript. Everyone.
http://code.google.com/p/phantomjs/issues/detail?id=593
This removes the need to build breakpad as a separate step.
PhantomJS developers will still need to cd src/breakpad && ./configure
&& make in order to analyse crash dumps, but it is not longer necessary
in order to build PhantomJS itself.
https://code.google.com/p/phantomjs/issues/detail?id=576
This adds a new WebPage::zoomFactor property, which can be used to
zoom the page, i.e.:
page.zoomFactor = 1.5; // zoom by 50% in
page.zoomFactor = 0.5; // zoom by 50% out
The rasterize.js example is adapted to take an optional fourth argument
to set the zoom factor. Furthermore, the webpage-spec is extended with
a simple test case for the new property.
ISSUE: 579 (http://code.google.com/p/phantomjs/issues/detail?id=579)
Note that for errors that occur within subpages, this object is not the
real error object, but a copy. This is because the real object exists
within the subpage, but the page.onError handler runs within the main
context, so we have to pass it through as data.
https://code.google.com/p/phantomjs/issues/detail?id=166
Info.plist is needed to surpress the dock icon. Up to now, we need to have
the file available at run-time. With this change, the contents of
Info.plist are embedded in the executable at the linking stage, thus
there is no need to deploy the Info.plist file anymore.
Credit to Smokey Ardisson for the tip.
http://code.google.com/p/phantomjs/issues/detail?id=528
ISSUE: 460 (http://code.google.com/p/phantomjs/issues/detail?id=460)
this is a backport from qtbase:
commit 89cfe9eb01ad75c14121dbd6038b7c791226acf1
Author: Jiang Jiang <jiang.jiang@nokia.com>
Date: Thu Nov 10 18:01:56 2011 +0100
We need to reregister fonts in initializeDb because basic font db
doesn't have an internal record like fontconfig does, so just
repopulating the font database won't work. db->reregisterAppFonts
is now used properly as intended (reregister application fonts
after the system font database has been cleared).
Also, static variable 'initialized' in initializeDb() is removed
since we check privateDb()->count to see if it needs to be populated
again.
Task-number: QTBUG-22063
Change-Id: Ifc66392b56b72acbe08b99256c61421c204be5d7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
After the change to system.args which has the app as first element,
the rasterize example was not properly adapted. Due to that, one
could not pass a size parameter to it anymore, resulting in PDFs
without page breaks.
ISSUE: 523 (http://code.google.com/p/phantomjs/issues/detail?id=523)
The comment now explains how to delegate the header/footer setup
to the loaded HTML page by giving an explicit HTML example that
defines the required PhantomJSPrinting object
ISSUE: 512 (http://code.google.com/p/phantomjs/issues/detail?id=512)
The script now copies all required shared libraries found via ldd
to the deployment folder.
Furthermore, a run-script is created that runs the phantomjs binary
through the copied build-host's ld-linux.so to ensure all symbols
are properly resolved.
Last but not least, we now include a very slightly modified brandelf.c
from FreeBSD. This version can be compiled on Linux machines and is
used to change the ELF ABI of the binary and libs in the deployment
folder, such that they all use the old SYSV OS ABI for compatibility.
Usage:
$ package-linux-dynamic.sh
$ scp phantomjs-$version.tar.bz2 yourhost
$ ssh yourhost
$ tar -xf phantomjs-$version.tar.bz2
$ ./phantomjs-$version/phantomjs.sh
CC ISSUE: 413 (http://code.google.com/p/phantomjs/issues/detail?id=413)
(proper static build would still be desirable eventually if possible)