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:
parent
41a737fa89
commit
1b8d019d53
2 changed files with 5 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue