Revision history for WWW::Mechanize::Plugin::JavaScript and ::DOM
0.003 ??
The DOM plugin:
• Event attribute handlers now receive URL and line
number info.
• On a page that has no Content-Script-Type header, a
script element with no language specified no longer
causes warnings.
• It used to be that, if multiple script elements or event
attributes that used the same handler, and that handler was
passed to the plugin with a regexp to select it (as opposed
to 'default'), only every other script/event would be trig-
gered (forgot to clear a couple of hash iterators). This
has been fixed.
• $mech->content now returns the content in the encoding of
the page itself, rather than the encoding of the first page
encountered.
The JavaScript plugin:
• The engine method (experimental and undocumented--read the
source) has been added.
• clear_timeouts now actually works properly. It used to run
the code for each timeout only if the specified time had
*not* elapsed.
• Line numbers for event attributes are now passed to the back
end’s event2sub method.
JE back end:
• Read-only properties are now marked as such in the JS envi-
ronment (which prevents the setting of a property if a pro-
totype has a read-only property of the same name --the only
difference it makes) and now have their types (string, num-
ber, etc.) set properly.
• Class bindings now use JE’s ‘unwrap’ feature, so version
0.022 is now required.
• event2sub now supports line numbers.
0.002 23 December, 2007
The DOM plugin:
• The DOM plugin’s interface has changed. The callback rou-
tines 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’ call-
back 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 evalu-
ated 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.
0.001 24 November, 2007
First CPAN release
• The JavaScript plugin has been completely restructured. It
now supports multiple backends.
• It now allows one to provide an initialisation function that
is run whenever a JavaScript environment is created, as well
as custom alert, confirm and prompt functions.
• Allows binding of custom Perl classes via 'bind_classes'.
• The DOM plugin’s callback routines for fetching the page
content as HTML or text now check to see whether the page is
HTML first.
• The DOM plugin now overrides extract_forms.
• Started work on event-handling.
• A few other minor things
0.0.2 19 July, 2007
Updated ::DOM to work with a new patch for WWW::Mechanize
(modified according to Eric Wilhelm's suggestion)
0.0.1 17 July, 2007
A proof-of-concept sent to Andy Lester and to the LWP mailing
list. Requires a patch to WWW::Mechanize (also sent to
the list).