Skip to content

Commit

Permalink
added textarea example too
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 7, 2014
1 parent 54517db commit f3248d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.69 2014-12-07
5.69 2014-12-08
- Removed deprecated emit_safe method from Mojo::EventEmitter.
- Removed deprecated render_static method from Mojolicious::Controller.
- Reverted deprecation of Mojo::DOM::val.
Expand Down
13 changes: 8 additions & 5 deletions lib/Mojo/DOM.pm
Expand Up @@ -876,14 +876,17 @@ C<selected> attribute and extract their values.
# "b"
$dom->parse('<input name="a" value="b">')->at('input')->val->first;
# "c"
$dom->parse('<option value="c">Test</option>')->at('option')->val->first;
# "d"
$dom->parse('<option>d</option>')->at('option')->val->first;
$dom->parse('<textarea name="c">d</textarea>')->at('[name=c]')->val->first;
# "e"
$dom->parse('<select><option selected>e</option></select>')
$dom->parse('<option value="e">Test</option>')->at('option')->val->first;
# "f"
$dom->parse('<option>f</option>')->at('option')->val->first;
# "g"
$dom->parse('<select><option selected>g</option></select>')
->at('select')->val->first;
=head2 wrap
Expand Down

0 comments on commit f3248d6

Please sign in to comment.