Skip to content

Commit

Permalink
use a better generic selector in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 13, 2015
1 parent 77da896 commit decc47c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.11 2015-05-12
6.11 2015-05-14
- Updated jQuery to version 2.1.4.
- Fixed indentation of ASCII art in documentation browser. (jberger)
- Fixed bug where inline was not considered a reserved stash value.
Expand Down
16 changes: 8 additions & 8 deletions lib/Mojo/DOM.pm
Expand Up @@ -73,7 +73,7 @@ sub find { $_[0]->_collect(@{$_[0]->_css->select($_[1])}) }
sub following { _select($_[0]->_collect(@{$_[0]->_siblings(1)->[1]}), $_[1]) }
sub following_nodes { $_[0]->_collect(@{$_[0]->_siblings->[1]}) }

sub matches { $_[0]->_css->matches($_[1]) ? $_[0] : undef }
sub matches { $_[0]->_css->matches($_[1]) }

sub namespace {
my $self = shift;
Expand Down Expand Up @@ -445,7 +445,7 @@ whitespace trimming is enabled by default.
=head2 ancestors
my $collection = $dom->ancestors;
my $collection = $dom->ancestors('div > p');
my $collection = $dom->ancestors('div ~ p');
Find all ancestor elements of this node matching the CSS selector and return a
L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
Expand Down Expand Up @@ -488,7 +488,7 @@ node's content.
=head2 at
my $result = $dom->at('div > p');
my $result = $dom->at('div ~ p');
Find first descendant element of this element matching the CSS selector and
return it as a L<Mojo::DOM> object or return C<undef> if none could be found.
Expand Down Expand Up @@ -525,7 +525,7 @@ as L<Mojo::DOM> objects.
=head2 children
my $collection = $dom->children;
my $collection = $dom->children('div > p');
my $collection = $dom->children('div ~ p');
Find all child elements of this element matching the CSS selector and return a
L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
Expand Down Expand Up @@ -575,7 +575,7 @@ element as L<Mojo::DOM> objects.
=head2 find
my $collection = $dom->find('div > p');
my $collection = $dom->find('div ~ p');
Find all descendant elements of this element matching the CSS selector and
return a L<Mojo::Collection> object containing these elements as L<Mojo::DOM>
Expand All @@ -596,7 +596,7 @@ objects. All selectors from L<Mojo::DOM::CSS/"SELECTORS"> are supported.
=head2 following
my $collection = $dom->following;
my $collection = $dom->following('div > p');
my $collection = $dom->following('div ~ p');
Find all sibling elements after this node matching the CSS selector and return
a L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
Expand All @@ -617,7 +617,7 @@ node as L<Mojo::DOM> objects.
=head2 matches
my $bool = $dom->matches('div > p');
my $bool = $dom->matches('div ~ p');
Check if this element matches the CSS selector. All selectors from
L<Mojo::DOM::CSS/"SELECTORS"> are supported.
Expand Down Expand Up @@ -694,7 +694,7 @@ Parse HTML/XML fragment with L<Mojo::DOM::HTML>.
=head2 preceding
my $collection = $dom->preceding;
my $collection = $dom->preceding('div > p');
my $collection = $dom->preceding('div ~ p');
Find all sibling elements before this node matching the CSS selector and return
a L<Mojo::Collection> object containing these elements as L<Mojo::DOM> objects.
Expand Down

0 comments on commit decc47c

Please sign in to comment.