document.implementation

  • Revision slug: DOM/document.implementation
  • Revision title: document.implementation
  • Revision id: 54884
  • Created:
  • Creator: GpxMo2
  • Is current revision? No
  • Comment

Revision Content

{{template.DomRef()}}

Summary

Returns a DOMImplementation object associated with the current document.

Syntax

DOMImpObj = document.DOMImplementation

Example

var modName = "HTML";
var modVer = "2.0";
var conformTest = document.implementation.hasFeature(modName, modVer);

alert("DOM "   modName   " "   modVer   " supported?: "   conformTest);

// alerts with: "DOM HTML 2.0 supported?: true" if DOM Level 2 HTML module is supported.

A list of module names (e.g., Core, HTML, XML, etc) is available in the DOM Level 2 Conformance Section

Notes

If available, DOMImplementation is a special object that provides services for controlling things outside of a single document. For example, the DOMImplementation interface includes a createDocumentType method with which DTDs can be created for one or more documents managed by the implementation.

Specification

DOM Level 2 HTML: implementation

{{ wiki.languages( { "pl": "pl/DOM/document.implementation" } ) }}

Revision Source

<p>
{{template.DomRef()}}
</p>
<h3 name="Summary">Summary </h3>
<p>Returns a <code><a class="external" href="http://www.xulplanet.com/references/objref/DOMImplementation.html">DOMImplementation</a></code> object associated with the current document.
</p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval"><i>DOMImpObj</i> = document.DOMImplementation
</pre>
<h3 name="Example">Example </h3>
<pre>var modName = "HTML";
var modVer = "2.0";
var conformTest = document.implementation.hasFeature(modName, modVer);

alert("DOM "   modName   " "   modVer   " supported?: "   conformTest);

// alerts with: "DOM HTML 2.0 supported?: true" if DOM Level 2 HTML module is supported.
</pre>
<p>A list of module names (e.g., Core, HTML, XML, etc) is available in the DOM Level 2 <a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/introduction.html#ID-Conformance-h2">Conformance Section</a>
</p>
<h3 name="Notes">Notes </h3>
<p>If available, <code>DOMImplementation</code> is a special object that provides services for controlling things outside of a single document. For example, the DOMImplementation interface includes a <code>createDocumentType</code> method with which DTDs can be created for one or more documents managed by the implementation. 
</p>
<h3 name="Specification">Specification </h3>
<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490">DOM Level 2 HTML: implementation</a>
</p>{{ wiki.languages( { "pl": "pl/DOM/document.implementation" } ) }}
Revert to this revision