Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.467 kb
#include "Execute.h"
#include "WebPage.h"
Execute::Execute(WebPage *page, QStringList &arguments, QObject *parent) : Command(page, arguments, parent) {
void Execute::start() {
QString script = arguments()[0] + QString("; 'success'");
QVariant result = page()->currentFrame()->evaluateJavaScript(script);
if (result.isValid()) {
emit finished(new Response(true));
} else {
emit finished(new Response(false, "Javascript failed to execute"));
Jump to Line
Something went wrong with that request. Please try again.