Name
SPVM::Eg::Node::Document::HTML - Document(HTMLDocument) in JavaScript
Description
The Eg::Node::Document::HTML class in SPVM represents any HTML web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.
This class is a port of Document(HTMLDocument) in JavaScript.
Usage
my $html_document = Eg->implementation->create_html_document("Title");
my $body = $html_dobument->body;
Inheritance
Instance Methods
create_element
method create_element : Eg::Node::Element::HTML ($tag_name : string);
Creates the HTML element specified by $tag_name, or an Eg::Node::Element::HTML::Unknown if $tag_name isn't recognized.
For details, see Document.createElement in JavaScript.
document_element
method document_element : Eg::Node::Element::HTML ();
Returns the element that is the root(html) element of the document.
For details, see Document.documentElement in JavaScript.
head
method head : Eg::Node::Element::HTML ();
Returns the head element of the current document.
For details, see Document.head in JavaScript.
body
method body : Eg::Node::Element::HTML ();
Returns the body node of the current document.
For details, see Document.body in JavaScript.
Copyright & License
Copyright (c) 2024 Yuki Kimoto
MIT License