Changes for version 0.005

  • The DOM plugin: • New scripts_enabled method for enabling/disabling scripts. • The window object has been disentangled from the JavaScript plugin and made its own Perl class, under the DOM namespace. It is accessible via the ‘window’ method. • This allows the window object to inherit from HTML::DOM::EventTarget, which provides addEventListener, onclick, etc. • As a bonus, it has a ‘self’ method. • The JS plugin’s check_timeouts method is now deprecated. Use the DOM plugin’s new check_timers method instead. The JavaScript plugin: • Support for javascript: URLs • The JavaScript back end’s constructor is now called with the window object as its argument. It has to make the global object delegate to the window. JE back end (0.004): • Modified to conform to the previous item. It does not yet support wrapping global objects when they are passed to other JS environments.

Changes for version 0.005

  • The JavaScript plugin: • Incompatible changes: • set now expects a WWW::Scripter object as the first argument. • new_function, which used to offer no more functionality than set, now adds the function to all JS environments, including future ones (a bit like bind_classes). • New back_end method • The eval method is now public (it was there all along, but the docs were removed in the conversion from the Mech plugin to the Scripter plugin; the interface changed slightly in the process). • JE is now the default back end. SpiderMonkey used to be the back end, but there was never one available, so that made no difference. Now there is a SpiderMonkey back end (not included), but it is so full of bugs we need to wait a bit before flipping the switch back. JE back end (0.006): • A piece of JavaScript code calling a method on another global object no longer dies. This was broken by 0.004’s multiple-window clean-up. • Modified to make use of the plugin’s new back_end method, to reduce memory usage.

Modules

JavaScript plugin for WWW::Scripter

Provides

in lib/WWW/Scripter/Plugin/JavaScript/JE.pm