WWW::Scripter::Plugin::SpiderMonkey (that back end is bundled
separately). The SpiderMonkey back end is just a proof-of-concept as of
July, 2010, but may become the default in a future version. JE is now the
This method sets $@ and returns undef if there is an error.
set Sets the named variable to the value given. The first argument is the WWW::Scripter object. The last argument is the value. The intervening arguments are the names of properties, so if you want to assign to a property of a property ... of a global property, you can pass each property name separately like this:
back_end This returns the back end corresponding to the WWW::Scripter object passed to it, creating it if necessary. This is intended mostly for back ends themselves to use, for accessing frames, etc.
The members of the HTML DOM that are available depend on the versions of HTML::DOM and CSS::DOM installed. See HTML::DOM::Interface and CSS::DOM::Interface.
For a list of the properties of the window object, see WWW::Scripter.
The following methods must be implemented:
new This method is passed a window (WWW::Scripter) object.
This method can optionally create window, self and frames properties that refer to the global object, but this is not necessary. It might make things a little more efficient.
Finally, it has to return an object that implements the interface below.
The back end has to do some magic to make sure that, when the global object is passed to another JS environment, references to it automatically point to a new global object when the user (or calling code) browses to another page.
For instance, it could wrap up the global object in a proxy object that delegates to whichever global object corresponds to the document.
eval This should accept up to three arguments: a string of code, the file name or URL, and the first line number.
It must set $@ and return undef if there is an error.
event2sub ($code, $elem, $url, $first_line) This method needs to turn the event handler code in $code into an object with a call_with method and then return it. That objects call_with method will be called with the event target and the event object as its two arguments. Its return value, if defined, will be used to determine whether the events preventDefault method is called.
The functions scope must contain the following objects: the global object, the document, the elements form (if there is one) and the element itself.
If the $code could not be compiled, this method must set $@ and return undef, just like eval.
define_setter This will be called with a list of property names representing the path to the property. The last argument will be a coderef that must be called with the value assigned to the property.
perl 5.8.3 or higher (5.8.4 or higher recommended)
HTML::DOM 0.032 or higher
JE 0.022 or later (when the SpiderMonkey binding is stable enough it will become optional)
WWW::Scripter 0.022 or higher
LWP 5.815 or higher
There is currently no system in place for preventing pages from different sites from communicating with each other.
To report bugs, please e-mail the author.
Copyright (C) 2009-11 Father Chrysostomos <join @, sprout => join ., reverse org => cpan>
This program is free software; you may redistribute it and/or modify it under the same terms as perl.
Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 438: You forgot a =back before =head1