Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 20 lines (16 sloc) 0.644 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "Node.h"
#include "WebPage.h"
#include "WebPageManager.h"

Node::Node(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
}

void Node::start() {
  QStringList functionArguments(arguments());
  QString functionName = functionArguments.takeFirst();
  QVariant result = page()->invokeCapybaraFunction(functionName, functionArguments);
  QString attributeValue = result.toString();
  emit finished(new Response(true, attributeValue));
}

QString Node::toString() const {
  QStringList functionArguments(arguments());
  return QString("Node.") + functionArguments.takeFirst();
}
Something went wrong with that request. Please try again.