HTML::DOM::View - A Perl class for representing an HTML Document's 'defaultView'
Version 0.055
use HTML::DOM; $doc = HTML::DOM->new; $view = new MyView; $doc->defaultView($view); package MyView; BEGIN { @ISA = 'HTML::DOM::View'; } use HTML::DOM::View; sub new { my $self = bless {}, shift; # doesn't have to be a hash my $doc = shift; $self->document($doc); return $self } # ...
This class is used for an HTML::DOM object's 'default view.' It implements the AbstractView DOM interface.
It is an inside-out class, so you can subclass it without being constrained to any particular object structure.
Returns the document associated with the view.
You may pass an argument to set it, in which case the old value is returned. This attribute holds a weak reference to the object.
Returns the computed style as a CSS::DOM::Style object. $pseudo_elem is the name of the pseudo-element, with or without the initial colons (1 or 2).
$pseudo_elem
These are called by getComputedStyle and are expected to return the user agent and user style sheets, respectively, as CSS::DOM objects.
getComputedStyle
HTML::DOM
To install HTML::DOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::DOM
CPAN shell
perl -MCPAN -e shell install HTML::DOM
For more information on module installation, please visit the detailed CPAN module installation guide.