… | |
… | |
1724 | For example, instead of a blocking calls to C<new_session>, C<navigate_to> |
1724 | For example, instead of a blocking calls to C<new_session>, C<navigate_to> |
1725 | and C<back>, you can make a callback-based ones: |
1725 | and C<back>, you can make a callback-based ones: |
1726 | |
1726 | |
1727 | my $cv = AE::cv; |
1727 | my $cv = AE::cv; |
1728 | |
1728 | |
1729 | $wd->new_session ({}, sub { |
1729 | $wd->new_session_ ({}, sub { |
1730 | my ($status, $value) = @_, |
1730 | my ($status, $value) = @_; |
1731 | |
1731 | |
1732 | die "error $value->{error}" if $status ne "200"; |
1732 | die "error $value->{error}" if $status ne "200"; |
1733 | |
1733 | |
1734 | $wd->navigate_to_ ("http://www.nethype.de", sub { |
1734 | $wd->navigate_to_ ("http://www.nethype.de", sub { |
1735 | |
1735 | |