Name
DOMImplementation.createHTMLDocument( ) — create a skeletal HTML document
Availability
DOM Level 2 HTML
Synopsis
HTMLDocument createHTMLDocument(String title
);
Arguments
-
title
The title of the document. This text is used as the content of the
<title>
element of the newly created document.
Returns
The new HTMLDocument object.
Description
This method creates a new HTMLDocument object with a skeletal
document tree that includes the specified title. The
documentElement
property of the returned object is
an <html>
element, and this root element has
<head>
and <body>
tags as its children. The <head>
element in
turn has a <title>
child, which has the
specified title
string as its child.
createHTMLDocument( )
is defined not by the
DOMImplementation interface but by its HTMLDOMImplementation
subinterface. If an implementation supports the “HTML”
feature, its DOMImplementation object implements this method.
See Also
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.