WWW::Mechanize::Plugin::JavaScript and ::DOM, version 0.002 (alpha)

Plugins for WWW::Mechanize that provide HTML DOM and Java-
Script support.

This set of modules is at a very early stage. Only a few features have
been implemented so far. Whether it will work for a particular case is
hard to say. Try it and see. (And patches are always welcome.)


CHANGES IN THIS RELEASE

The DOM plugin:
  • The DOM plugin’s interface has changed. The callback routines
    passed to  it  now  get  a  WWW::Mechanize  object  as  their 
    first argument.
  • Line numbers for inline scripts now work properly.
The JavaScript plugin:
  • You can now set up class bindings before fetching the first page
    (it used to die).
  • CSS::DOM is now a prerequisite.
  • setTimeout and clearTimeout have been added, along with the
    check_timeouts plugin method.
  • There is now a ‘screen’ object, but it has no properties. You have
    to set them yourself with an ‘init’ callback routine.
  • There is an  ‘open’  method which simply moves to the next page,
    ignoring all arguments except the first. It is just a temporary
    placeholder.
  • The navigator object now has an appName property, set to
    WWW::Mechanize.
  • Back-ends  are  now  expected  to  accept  a  third  argument  to
    new_function, indicating the return type (the JE binding supports
    this of course :-).
  • JavaScript code referenced in the page itself (as opposed to code
    passed to the plugin’s eval method)  used to be evaluated in  the
    same JS environment for all pages. This has been fixed.
JE back end:
  • JS event handlers for HTML elements now have the form in the scope
    chain.  (This applies to all elements that have a ‘form’  method.)
  • JS event handlers now have the ‘this’ value set correctly.


INSTALLATION

The easiest way to install this module is to use the CPAN module or
the cpan script:

    [sudo] perl -MCPAN -e "install WWW::Mechanize::Plugin::JavaScript"

    [sudo] cpan WWW::Mechanize::Plugin::JavaScript

Or you can use the following:

    perl Makefile.PL
    make
    make test
    [sudo] make install


DEPENDENCIES

This module requires:

- perl 5.8.0 or higher

- JE 0.019 or higher

- HTML::DOM 0.010 or higher

- The experimental version of WWW::Mechanize available at
  http://www-mechanize.googlecode.com/svn/branches/plugins/

- CSS::DOM


DOCUMENTATION

After installing, you can find documentation for these modules with
the perldoc command.

    perldoc WWW::Mechanize::Plugin::JavaScript
    perldoc WWW::Mechanize::Plugin::DOM

Or try using man (it's faster, in my experience):

    man WWW::Mechanize::Plugin::JavaScript
    man WWW::Mechanize::Plugin::DOM


COPYRIGHT AND LICENCE

Copyright © 2007 Father Chrysostomos

This program is free software; you may redistribute it and/or modify
it under the same terms as perl.
