NAME
WWW::Mechanize::Plugin::DOM::Window - Window object for the DOM plugin
VERSION
Version 0.010
DESCRIPTION
This module provides the window object. It inherits from HTML::DOM::View and HTML::DOM::EventTarget.
METHODS
- location
-
Returns the location object (see WWW::Mechanize::Plugin::DOM::Location). If you pass an argument, it sets the
href
attribute of the location object. - alert
- confirm
- prompt
-
Each of these calls the function assigned by one of the following methods:
- set_alert_function
- set_confirm_function
- set_prompt_function
-
Use these to set the functions called by the above methods. There are no default
confirm
andprompt
functions. The defaultalert
prints to the currently selected file handle, with a line break tacked on the end. -
Returns the navigator object. This currently has three properties,
appName
(set toref $mech
)appVersion
(ref($mech)->VERSION
) anduserAgent
(same as$mech->agent
).You can pass values to
appName
andappVersion
to set them. - setTimeout ( $code, $ms );
-
This schedules the
$code
to run after$ms
seconds have elapsed, returning a number uniquely identifying the time-out. - clearTimeout ( $timeout_id )
-
The cancels the time-out corresponding to the
$timeout_id
. - open ( $url )
-
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')
. - window
- self
-
These two return the window object itself.
- mech
-
This returns the WWW::Mechanize object that corresponds to the window.
THE %Interface
HASH
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:
(
alert => VOID|METHOD,
confirm => BOOL|METHOD,
...
)
It does not include mech
.