1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

delete useless code

This commit is contained in:
Jon Leighton 2012-01-10 23:55:31 +00:00
parent 41a737fa89
commit 1b8d019d53
2 changed files with 5 additions and 7 deletions

View file

@ -93,6 +93,7 @@ class PoltergeistAgent.Node
results = @agent.document.evaluate('.//text()[not(ancestor::script)]', el, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
text = ''
for i in [0...results.snapshotLength]
text += results.snapshotItem(i).textContent
text
@ -136,9 +137,7 @@ class PoltergeistAgent.Node
tagName: ->
@element.tagName
elementVisible: (element) ->
isVisible: (id) ->
isVisible: ->
visible = (element) ->
if @window.getComputedStyle(element).display == 'none'
false
@ -148,7 +147,7 @@ class PoltergeistAgent.Node
true
visible @element
position: (id) ->
position: ->
pos = (element) ->
x = element.offsetLeft
y = element.offsetTop

View file

@ -158,8 +158,7 @@ PoltergeistAgent.Node = (function() {
Node.prototype.tagName = function() {
return this.element.tagName;
};
Node.prototype.elementVisible = function(element) {};
Node.prototype.isVisible = function(id) {
Node.prototype.isVisible = function() {
var visible;
visible = function(element) {
if (this.window.getComputedStyle(element).display === 'none') {
@ -172,7 +171,7 @@ PoltergeistAgent.Node = (function() {
};
return visible(this.element);
};
Node.prototype.position = function(id) {
Node.prototype.position = function() {
var pos;
pos = function(element) {
var parentPos, x, y;