Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.523 kb
#include "Execute.h"
#include "WebPage.h"
#include "WebPageManager.h"
Execute::Execute(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, 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, QString("Javascript failed to execute")));
Jump to Line
Something went wrong with that request. Please try again.