Skip to content

Commit

Permalink
use the :checked pseudo-class
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 21, 2015
1 parent 75d1990 commit a11d4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

6.21 2015-09-21
6.21 2015-09-22
- Added val method to Mojo::DOM.

6.20 2015-09-15
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/DOM.pm
Expand Up @@ -167,7 +167,7 @@ sub val {
return $self->{value} // $self->text if $tag eq 'option';

# "select"
return $self->find('option[selected]')->map('val')->to_array
return $self->find('option:checked')->map('val')->to_array
if $tag eq 'select';

# "textarea", "input" or "button"
Expand Down

0 comments on commit a11d4c9

Please sign in to comment.