Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using separated methods to set and get the innerHTML

  • Loading branch information...
commit a2748b0e6296ea9ee5e65ad10ddf51ab907da9d1 1 parent 96e3401
@carloslopes carloslopes authored
Showing with 7 additions and 7 deletions.
  1. +2 −2 lib/capybara/webkit/node.rb
  2. +5 −5 src/capybara.js
View
4 lib/capybara/webkit/node.rb
@@ -25,11 +25,11 @@ def value
end
def inner_html
- invoke 'innerHTML'
+ invoke 'get_innerHTML'
end
def inner_html=(value)
- invoke 'innerHTML', value
+ invoke 'set_innerHTML', value
end
def set(value)
View
10 src/capybara.js
@@ -168,12 +168,12 @@ Capybara = {
return this.nodes[index].value;
},
- innerHTML: function(index, value) {
- if(value === undefined)
- return this.nodes[index].innerHTML;
- else
- this.nodes[index].innerHTML = value;
+ get_innerHTML: function(index) {
+ return this.nodes[index].innerHTML;
+ },
+ set_innerHTML: function(index, value) {
+ this.nodes[index].innerHTML = value;
return true;
},
Please sign in to comment.
Something went wrong with that request. Please try again.