Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Whitespace.

  • Loading branch information...
commit 47f38b89fcb8c488820de48893ce6dc94526cda2 1 parent f691226
@tristandunn authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/webkit_server.js
View
22 src/webkit_server.js
@@ -3,19 +3,19 @@ window.WebKitServer = {
nodes: {},
lastAttachedFile: "",
- invoke: function () {
+ invoke: function() {
return this[WebKitServerInvocation.functionName].apply(this, WebKitServerInvocation.arguments);
},
- find: function (xpath) {
+ find: function(xpath) {
return this.findRelativeTo(document, xpath);
},
- findWithin: function (index, xpath) {
+ findWithin: function(index, xpath) {
return this.findRelativeTo(this.nodes[index], xpath);
},
- findRelativeTo: function (reference, xpath) {
+ findRelativeTo: function(reference, xpath) {
var iterator = document.evaluate(xpath, reference, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
var node;
var results = [];
@@ -31,7 +31,7 @@ window.WebKitServer = {
return document.evaluate("ancestor-or-self::html", this.nodes[index], null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue != null;
},
- text: function (index) {
+ text: function(index) {
var node = this.nodes[index];
var type = (node.type || node.tagName).toLowerCase();
if (type == "textarea") {
@@ -41,7 +41,7 @@ window.WebKitServer = {
}
},
- attribute: function (index, name) {
+ attribute: function(index, name) {
switch(name) {
case 'checked':
return this.nodes[index].checked;
@@ -60,13 +60,13 @@ window.WebKitServer = {
return this.nodes[index].tagName.toLowerCase();
},
- click: function (index) {
+ click: function(index) {
var clickEvent = document.createEvent('MouseEvents');
clickEvent.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
this.nodes[index].dispatchEvent(clickEvent);
},
- trigger: function (index, eventName) {
+ trigger: function(index, eventName) {
var eventObject = document.createEvent("HTMLEvents");
eventObject.initEvent(eventName, true, true);
this.nodes[index].dispatchEvent(eventObject);
@@ -85,7 +85,7 @@ window.WebKitServer = {
this.nodes[index].dispatchEvent(eventObject);
},
- visible: function (index) {
+ visible: function(index) {
var element = this.nodes[index];
while (element) {
if (element.ownerDocument.defaultView.getComputedStyle(element, null).getPropertyValue("display") == 'none')
@@ -95,7 +95,7 @@ window.WebKitServer = {
return true;
},
- selected: function (index) {
+ selected: function(index) {
return this.nodes[index].selected;
},
@@ -178,7 +178,7 @@ window.WebKitServer = {
}
},
- dragTo: function (index, targetIndex) {
+ dragTo: function(index, targetIndex) {
var element = this.nodes[index], target = this.nodes[targetIndex];
var position = this.centerPostion(element);
var options = {
Please sign in to comment.
Something went wrong with that request. Please try again.