Sha256: 1d9bd63e0f5cae41a14406b4d8195707bb1035bbe3998ae044ba0635324a532b

Contents?: true

Size: 809 Bytes

Versions: 1

Compression:

Stored size: 809 Bytes

Contents

#include "Node.h"
#include "WebPage.h"
#include "WebPageManager.h"
#include "InvocationResult.h"

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

void Node::start() {
  QStringList functionArguments(arguments());
  QString functionName = functionArguments.takeFirst();
  QString allowUnattached = functionArguments.takeFirst();
  InvocationResult result = page()->invokeCapybaraFunction(functionName, allowUnattached == "true", functionArguments);
  if (functionName == "focus_frame") {
    page()->setCurrentFrameParent(page()->currentFrame()->parentFrame());
  }
  finish(&result);
}

QString Node::toString() const {
  QStringList functionArguments(arguments());
  return QString("Node.") + functionArguments.takeFirst();
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capybara-webkit-1.14.0 src/Node.cpp