Added inner_html accessors methods #394

Merged
merged 3 commits into from Oct 10, 2012

Conversation

Projects
None yet
2 participants
Contributor

carloslopes commented Sep 26, 2012

node.inner_html # return the inner_html of the node
node.inner_html = '<small>foobar</small>' # update the inner_html of the node
src/capybara.js
@@ -168,6 +168,15 @@ Capybara = {
return this.nodes[index].value;
},
+ innerHTML: function(index, value) {
@jferris

jferris Sep 27, 2012

Owner

The value parameter here is acting as a Control Couple. It would be better to send a different message for setting vs getting the HTML and remove this conditional.

Owner

jferris commented Sep 27, 2012

Thanks for the pull request. I had one comment about the implementation. If you want to take a look at that, I'd like to get this merged in.

Contributor

carloslopes commented Sep 27, 2012

@jferris Is it good now?

and thank you for the review 😄

Owner

jferris commented Sep 28, 2012

One more change: our Javascript naming conventions would be setInnerHTML and getInnerHTML. You can make that change, or I'll make it in a while and merge this in. Thanks again.

Contributor

carloslopes commented Sep 28, 2012

yes, i forgot to use camel case :wink2:

Contributor

carloslopes commented Oct 10, 2012

do i need to do something more to this be pulled?

@jferris jferris merged commit 32db848 into thoughtbot:master Oct 10, 2012

Owner

jferris commented Oct 10, 2012

Nope - thanks for pinging me on this. I merged this into master.

Contributor

carloslopes commented Oct 10, 2012

great! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment