Revision history for WWW::Scripter 0.013 2 May, 2010 navigator->javaEnabled has been added. It always returns false. 0.012 25 April, 2010 setInterval and clearInterval have been added. 0.011 18 April, 2010 • Support for multiple ‘windows’: • New WWW::Scripter::WindowGroup class • New window_group, blur, close and focus methods • The open method now opens new windows, returning the window it opened. • Support for link targets and tags, including the new find_target and name methods • navigator->appCodeName • follow_link and click now return the response object, instead of returning nothing. (Thanks to Hannes Beinert for report- ing this.) • follow_link no longer dies when autocheck is on (unless it’s supposed to). • The WWW::Mechanize::Link and ::Image objects returned by vari- ous methods now update automatically if the underlying HTML element changes. • The history object’s go method now reloads the page with zeroes that are boolean-true (like the strings "00" and "0e0"), instead of just with false zeroes. • The title method now sets the page title if passed an argument. • Script handlers can now use the Mech interface to access forms during parsing. • Fetching a page no longer interferes with a tied $_. 0.010 15 November, 2009 • New dom_enabled method that allows HTML parsing to be switched off. • Scripts served with a content type of text/html are no longer parsed into inaccessible DOM trees. This used to cause warning messages if a JS file when read as HTML appeared to con- tain scripts. • The document method now returns undef if the page is not HTML, instead of returning the previous page’s document. 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 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 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 , plus some new code to tape it all together.