WWW::Mechanize::Plugin::DOM::Window - Window object for the DOM plugin
Version 0.006
This module provides the window object. It inherits from HTML::DOM::View and HTML::DOM::EventTarget.
Returns the location object (see WWW::Mechanize::Plugin::DOM::Location). If you pass an argument, it sets the href attribute of the location object.
href
Each of these calls the function assigned by one of the following methods:
Use these to set the functions called by the above methods. There are no default confirm and prompt functions. The default alert prints to the currently selected file handle, with a line break tacked on the end.
confirm
prompt
alert
Returns the navigator object. This currently has two properties, appName (set to ref $mech) and userAgent (same as $mech->agent).
appName
ref $mech
userAgent
$mech->agent
This schedules the $code to run after $ms seconds have elapsed, returning a number uniquely identifying the time-out.
$code
$ms
The cancels the time-out corresponding to the $timeout_id.
$timeout_id
This is a temporary placeholder. Right now it ignores all its args except the first, and goes to the given URL, such that ->open(foo) is equivalent to ->location('foo').
->open(foo)
->location('foo')
These two return the window object itself.
%Interface
The hash named %WWW::Mechanize::Plugin::DOM::Window::Interface lists the interface members for the window object. It follows the same format as hashes within %HTML::DOM::Interface, like this:
%WWW::Mechanize::Plugin::DOM::Window::Interface
( alert => VOID|METHOD, confirm => BOOL|METHOD, ... )
WWW::Mechanize
WWW::Mechanize::Plugin::DOM
WWW::Mechanize::Plugin::DOM::Location
HTML::DOM::View
To install WWW::Mechanize::Plugin::JavaScript, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Plugin::JavaScript
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Plugin::JavaScript
For more information on module installation, please visit the detailed CPAN module installation guide.