The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Name

SPVM::Eg::DOM::Implementation - DOMImplementation in JavaScript

Description

The Eg::DOM::Implementation class in SPVM represents an object providing methods which are not dependent on any particular document.

This class is a port of DOMImplementation in JavaScript.

Usage

  my $xml_document = Eg->document->implementation->create_document("http://www.w3.org/1999/xhtml", "html");
  
  my $html_document = Eg->document->implementation->create_html_document("Title");

Instance Methods

create_document

method create_document : Eg::Node::Document::XML ($namespace_uri : string, $qualified_name_str : string, $document_type : Eg::Node::DocumentType = undef);

Creates and returns an Eg::Node::Document::XML.

For details, see DOMImplementation.createDocument in JavaScript.

create_document_type

  method create_document_type : L<Eg::Node::DocumentType|SPVM::Eg::Node::DocumentType> ($qualified_name_str : string, $public_id : string, $system_id : string);

Creates and returns a Eg::Node::DocumentType object.

For details, see DOMImplementation.createDocumentType in JavaScript.

create_html_document

  method create_html_document : L<Eg::Node::Document|SPVM::Eg::Node::Document> ($title : string = undef);

Creates and returns a new Eg::Node::Document object.

For details, see DOMImplementation.createHTMLDocument in JavaScript.

Related Classes

Copyright & License

Copyright (c) 2024 Yuki Kimoto

MIT License