The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTML::Object::DOM::Root - HTML Object

SYNOPSIS

    use HTML::Object::DOM::Root;
    my $this = HTML::Object::DOM::Root->new || die( HTML::Object::DOM::Root->error, "\n" );

VERSION

    v0.2.0

DESCRIPTION

This module implements a Root in DOM. It inherits from HTML::Object::Root and HTML::Object::DOM::Node

INHERITANCE

    +---------------------------+     +-------------------------+     +--------------------+     +-------------------------+
    |   HTML::Object::Element   | --> | HTML::Object::Document  | --> | HTML::Object::Root | --> | HTML::Object::DOM::Root |
    +---------------------------+     +-------------------------+     +--------------------+     +-------------------------+
      |                                                                                            ^
      |                                                                                            |
      v                                                                                            |
    +---------------------------+     +-------------------------+                                  |
    | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | ---------------------------------+
    +---------------------------+     +-------------------------+

METHODS

cmp

Provided with another object and this returns true if the other object is a HTML::Object::Root object or false otherwise.

getAttributes

Returns an empty list in list context, or an empty array reference in scalar context.

getChildNodes

Returns the "root" element.

getName

Returns an empty list in list context, or undef in scalar context.

getNextSibling

Returns an empty list in list context, or undef in scalar context.

getParentNode

Returns an empty list in list context, or undef in scalar context.

getPreviousSibling

Returns an empty list in list context, or undef in scalar context.

getRootNode

Returns itself.

is_inside

Returns false.

isDocumentNode

Returns true.

root

Sets or gets a root node, which should be a HTML::Object::DOM::Element::HTML object.

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

HTML::Object::DOM::Element::HTML

COPYRIGHT & LICENSE

Copyright(c) 2021 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.