Method: Element#children
- Defined in:
- lib/source/redshift/element.rb
#children(match_selector = nil) ⇒ Object
call-seq:
elem.children -> array
Returns the array of elem’s child elements on the DOM tree.
<div id="container">
<div id="a_element"></div>
<div id="a_inner_element"></div>
</div>
<div id="b_element"></div>
</div>
Document['#container'].children #=> [#<Element: DIV id="a_element">, #<Element: DIV id="b_element">]
83 84 85 |
# File 'lib/source/redshift/element.rb', line 83 def children(match_selector = nil) Document.walk(self, 'nextSibling', 'firstChild', match_selector, true) end |