aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/domimplementation/index.html
blob: e49ceda64a7e0df0b79efd1cec237967855f84d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
title: DOMImplementation
slug: Web/API/DOMImplementation
tags:
  - API
  - DOM
  - Interface
  - NeedsTranslation
  - Reference
  - Référence(2)
  - TopicStub
translation_of: Web/API/DOMImplementation
---
<p>{{ ApiRef("DOM") }}</p>

<p>The <code><strong>DOMImplementation</strong></code> interface represent an object providing methods which are not dependent on any particular document. Such an object is returned by the {{domxref("Document.implementation")}} property.</p>

<h2 id="Property">Property</h2>

<p><em>This interface has no specific property and doesn't inherit any.</em></p>

<h2 id="Methods">Methods</h2>

<p><em>No inherited method.</em></p>

<dl>
	<dt>{{domxref("DOMImplementation.createDocument()")}}</dt>
	<dd>Creates and returns an {{domxref("XMLDocument")}}.</dd>
	<dt>{{domxref("DOMImplementation.createDocumentType()")}}</dt>
	<dd>Creates and returns a {{domxref("DocumentType")}}.</dd>
	<dt>{{domxref("DOMImplementation.createHTMLDocument()")}}</dt>
	<dd>Creates and returns an HTML {{domxref("Document")}}.</dd>
	<dt>{{domxref("DOMImplementation.hasFeature()")}}</dt>
	<dd>Returns a {{domxref("Boolean")}} indicating if a given feature is supported or not. This function is unreliable and kept for compatibility purpose alone: except for SVG-related queries, it always returns <code>true</code>. Old browsers are very inconsistent in their behavior.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
	<tbody>
		<tr>
			<th scope="col">Specification</th>
			<th scope="col">Status</th>
			<th scope="col">Comment</th>
		</tr>
		<tr>
			<td>{{SpecName('DOM WHATWG', '#domimplementation', 'DOMImplementation')}}</td>
			<td>{{Spec2('DOM WHATWG')}}</td>
			<td>Removed the <code>getFeature()</code> method.<br>
			Added the <code>createHTMLDocument()</code> method.<br>
			Modified the return type of <code>createDocument()</code> from {{domxref("Document")}} to {{domxref("XMLDocument")}}.</td>
		</tr>
		<tr>
			<td>{{SpecName('DOM3 Core', 'core.html#ID-102161490', 'DOMImplementation')}}</td>
			<td>{{Spec2('DOM3 Core')}}</td>
			<td>Added the <code>getFeature()</code> method (never implemented by any user agent).</td>
		</tr>
		<tr>
			<td>{{SpecName('DOM2 Core', 'core.html#ID-102161490', 'DOMImplementation')}}</td>
			<td>{{Spec2('DOM2 Core')}}</td>
			<td>Added the <code>createDocument()</code> and <code>createDocumentType()</code> methods.</td>
		</tr>
		<tr>
			<td>{{SpecName('DOM1', 'level-one-core.html#ID-102161490', 'DOMImplementation')}}</td>
			<td>{{Spec2('DOM1')}}</td>
			<td>Initial definition.</td>
		</tr>
	</tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.DOMImplementation")}}</p>

<h2 id="See_also">See also</h2>

<ul>
	<li><a href="/en-US/docs/DOM/DOM_Reference" title="/en-US/docs/DOM/DOM_Reference">The DOM interfaces index.</a></li>
</ul>