HTML::O...entation(3)
π HTML::Object::DOM::Implementation π
okay bestie, welcome to HTML::O...entation(3) from the User Contributed Perl Documentation crew π this is the whole page for HTML::Object::DOM::Implementation, and we're gonna get into it with zero skipped details, fr fr.
πΈ NAME πΈ
HTML::Object::DOM::Implementation β HTML Object DOM Implementation. literally what it says on the tin β¨
β¨ SYNOPSIS β¨
use HTML::Object::DOM::Implementation;
my $impl = HTML::Object::DOM::Implementation->new ||
die( HTML::Object::DOM::Implementation->error, "\n" );
π¦ VERSION π¦
v0.2.0 β that's the version, bestie π
π DESCRIPTION π
The Implementation interface represents an object providing methods which are not dependent on any particular document. You get one back from the implementation property in HTML::Object::DOM::Document. that's the vibe π«Ά
π PROPERTIES π
There are no properties. none. zero. zilch. the property section is empty and we respect it π
π METHODS π
okay so here come the methods, bestie β keep up, they're not scary, i promise π
π createDocument π
Provided with a namespace URI (which could be an empty string) and a qualified name for the top element, which should be "html", and optionally a document type definition object, and this creates and returns a document object.
Normally, this method is used to create an XML document, but we do not support XML, so this is basically an alias for createHTMLDocument.
The namespaceURI argument is completely ignored, so do not bother, and the qualified name can only be "html".
Example:
my $doc = $doc->implementation->createDocument( $namespaceURI, $qualifiedNameStr, $documentType_object );
my $doc = $doc->implementation->createDocument( '', 'html' );
my $body = $doc->createElement( 'body' );
$body->setAttribute( 'id', 'abc' );
$doc->documentElement->appendChild( $body );
say( $doc->getElementById( 'abc') ); # [object HTMLBodyElement]
See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocument
π§ createDocumentType π§
Provided with a qualified name, which should be "html", and an optional public id and system id, both of which are ignored, and this creates and returns a document type object.
Example:
my $doctype = $doc->implementation->createDocumentType( 'html', $publicId, $systemId );
my $dt = $doc->implementation->createDocumentType( 'svg:svg', '-//W3C//DTD SVG 1.1//EN', 'http://www->w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' );
my $d = $doc->implementation->createDocument( 'http://www->w3.org/2000/svg', 'svg:svg', $dt );
say( $d->doctype->publicId); # -//W3C//DTD SVG 1.1//EN
See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createDocumentType
π¦ createHTMLDocument π¦
Creates and returns an HTML Document. iconic behavior, honestly π
Example:
# Assuming $title is "Demo"
my $newDoc = $doc->implementation->createHTMLDocument( $title );
Result:
<!DOCTYPE html>
<html>
<head><title>Demo</title></head>
<body></body>
</html>
See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument
π₯ hasFeature π₯
This always returns true. no cap.
Its original purpose is to return a boolean value indicating if a given feature is supported or not. However, this function has been unreliable and kept for compatibility purpose alone: except for SVG-related queries.
Example:
my $flag = $doc->implementation->hasFeature( $feature, $version );
See also Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/hasFeature
π AUTHOR π
Jacques Deguest <jack@deguest.jp> β yes, that's the author, bestie π
π SEE ALSO π
Mozilla documentation https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation
π COPYRIGHT & LICENSE π
Copyright(c) 2022 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.
and that's the whole page, bestie π«Ά signed off from perl v5.42.2, dated 2026-02-15, on HTML::O...entation(3). periodt π
π
π¦ where this page comes from
- alpine 3.24: perl-html-object-doc 0.6.0-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms