Revision history for WWW::Scripter
0.009 25 October, 2009
• count_timers and check_timers now know about timers in
(i)frames.
• Adding an inline script to the DOM dynamically (e.g., via
appendChild) no longer produces a warning.
• Empty script elements with no src attribute no longer cause
errors.
• The base URL for an about:blank page in a frame is now taken
from the parent window.
• check_timers now catches script errors and turns them into
warnings. It used to die with code refs (introduced in the pre-
vious version) and silence them with strings of code.
• Location objects are no longer shared between frames (causing
navigation in a frame via the location object to navigate the
top window instead).
• Event handlers with call_with methods no longer get passed a
strange WWW::Scripter::EventTarget object. (These objects had
existed since version 0.005 and were *supposed* to be for
internal use, but leaked out. They were for keeping a diffe-
rent set of window event handlers for each page.)
0.008 19 October, 2009
• The base method now uses HTML::DOM’s base method, in order to
work with multiple <base> tags and dynamic changes to the base.
• We now include scroll, scrollBy and scrollTo methods, in case
a script tries to call them. They don’t actually do anything.
• Frames with no src element or an empty src element used to
load the parent page, resulting in infinite recursion. This
has been fixed.
• setTimeout now works with a code ref as the first argument.
• count_timers no longer clobbers the $_ variable.
0.007 9 October, 2009
The clone method now handles copies class_info over. class-
_info no longer dies when called on a clone with no arguments
in list or scalar context.
0.006 30 September, 2009
WWW::Scripter now overrides WWW::Mechanize’s submit method to
trigger onsubmit. (Thanks to Steven Nikkel for stumbling
across this.)
0.005 17 September, 2009
• max_docs and max_history have been added. Mech’s stack_depth
is now honoured. (max_docs is an off-by-one alias to
stack_depth.)
• When no browsing has happened, the current page is now
about:blank. (It used to be an uninitialised state in which
some methods, such as uri, would just die.)
• URL fragments are now supported. They are now stripped from
URLs when the actual request is made (they used to be sent to
the server). Fetching a URL that differs from the current one
only by its fragment does not reload the page, but does add a
history entry. You can now use the location object to get the
URL with its fragment. Use the uri method to get the real URL.
• location->replace now works correctly. (It used to be a quick-
and-dirty ‘back’ followed by ‘get’.)
• location->reload now actually reloads the page. In version
0.002, it would simply refresh the page from the response
object. Version 0.003 broke that by making it a no-op.
• Support for onunload handlers
• onload handlers are now called on the window, not the body ele-
ment, with the document as the event target.
• WWW::Scripter no longer inherits from HTML::DOM::EventTarget,
but it still provides the interface, so it now has a
DOES method.
• Setting the value of the location object’s hash and search
attributes now works. It used to be a no-op unless it was set
to the old value.
• The host, hostname, pathname, port, protocol, search and href
methods of the location object now return the old value
upon setting.
• The host and hostname methods of the location object have been
corrected such that host now returns the port as well,
hostname no longer returns the port, setting hostname to a
string containing a port no longer sets the port and setting
host with a port number now works. (In other words, they were
switched round and were a bit buggy, too.)
• I forgot to add the CSS interface to the class_info. Now
it’s there.
0.004 16 August, 2009
The frames method no longer dies when the page is not HTML.
0.003 15 August, 2009
• When you go back (or forward) to a page, the same document
object is used once more. It used to be parsed afresh.
• Detecting the charset now works with LWP 5.827 and later.
0.002 9 April, 2009
One bug fix: The credentials method now works.
0.001 5 April, 2009
First release. This consists of code copied and pasted from
parts of WWW::Mechanize::Plugin::DOM and the experimental
plugin version of WWW::Mechanize at
<http://www-mechanize.googlecode.com/svn/wm/branches/plugins/>,
plus some new code to tape it all together.