lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.7.0 vs lib/capybara/poltergeist/client/compiled/node.js in poltergeist-1.8.0
- old
+ new
@@ -1,33 +1,32 @@
-var __slice = [].slice;
+var slice = [].slice;
Poltergeist.Node = (function() {
- var name, _fn, _i, _len, _ref,
- _this = this;
+ var fn, i, len, name, ref;
- Node.DELEGATES = ['allText', 'visibleText', 'getAttribute', 'value', 'set', 'setAttribute', 'isObsolete', 'removeAttribute', 'isMultiple', 'select', 'tagName', 'find', 'getAttributes', 'isVisible', 'position', 'trigger', 'parentId', 'parentIds', 'mouseEventTest', 'scrollIntoView', 'isDOMEqual', 'isDisabled', 'deleteText', 'containsSelection', 'path'];
+ Node.DELEGATES = ['allText', 'visibleText', 'getAttribute', 'value', 'set', 'setAttribute', 'isObsolete', 'removeAttribute', 'isMultiple', 'select', 'tagName', 'find', 'getAttributes', 'isVisible', 'isInViewport', 'position', 'trigger', 'parentId', 'parentIds', 'mouseEventTest', 'scrollIntoView', 'isDOMEqual', 'isDisabled', 'deleteText', 'containsSelection', 'path', 'getProperty'];
function Node(page, id) {
this.page = page;
this.id = id;
}
Node.prototype.parent = function() {
return new Poltergeist.Node(this.page, this.parentId());
};
- _ref = Node.DELEGATES;
- _fn = function(name) {
+ ref = Node.DELEGATES;
+ fn = function(name) {
return Node.prototype[name] = function() {
var args;
- args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
+ args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
return this.page.nodeCall(this.id, name, args);
};
};
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- name = _ref[_i];
- _fn(name);
+ for (i = 0, len = ref.length; i < len; i++) {
+ name = ref[i];
+ fn(name);
}
Node.prototype.mouseEventPosition = function() {
var middle, pos, viewport;
viewport = this.page.viewportSize();
@@ -84,6 +83,6 @@
return this.page === other.page && this.isDOMEqual(other.id);
};
return Node;
-}).call(this);
+})();