aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/domimplementation
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/api/domimplementation
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/pt-br/web/api/domimplementation')
-rw-r--r--files/pt-br/web/api/domimplementation/createdocument/index.html83
-rw-r--r--files/pt-br/web/api/domimplementation/index.html81
2 files changed, 164 insertions, 0 deletions
diff --git a/files/pt-br/web/api/domimplementation/createdocument/index.html b/files/pt-br/web/api/domimplementation/createdocument/index.html
new file mode 100644
index 0000000000..61c90cd7b8
--- /dev/null
+++ b/files/pt-br/web/api/domimplementation/createdocument/index.html
@@ -0,0 +1,83 @@
+---
+title: DOMImplementation.createDocument()
+slug: Web/API/DOMImplementation/createDocument
+translation_of: Web/API/DOMImplementation/createDocument
+---
+<p>{{ApiRef("DOM")}}</p>
+
+<p>O método <strong><code>DOMImplementation.createDocument()</code></strong> cria e retorna um {{domxref("XMLDocument")}}.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox"><em>doc</em> = document.implementation.createDocument(<em>namespaceURI</em>, <em>qualifiedNameStr</em>, <em>documentType</em>);</pre>
+
+<h3 id="Parâmetros">Parâmetros</h3>
+
+<dl>
+ <dt><em>namespaceURI</em></dt>
+ <dd>É um {{domxref("DOMString")}} contendo a URI do namespace do documento que será criado, ou <code>null</code> se o documento não pertencer a nenhum.</dd>
+</dl>
+
+<dl>
+ <dt><em>qualifiedNameStr </em></dt>
+ <dd>Is a {{domxref("DOMString")}} containing the qualified name, that is an optional prefix and colon plus the local root element name, of the document to be created.</dd>
+</dl>
+
+<dl>
+ <dt><em>documentType </em>{{optional_inline}}</dt>
+ <dd>
+ <p>Is the {{domxref("DocumentType")}} of the document to be created. It defaults to <code>null</code>.</p>
+ </dd>
+</dl>
+
+<ul>
+</ul>
+
+<h2 id="Example">Example</h2>
+
+<pre class="brush: js">var doc = document.implementation.createDocument ('http://www.w3.org/1999/xhtml', 'html', null);
+var body = document.createElementNS('http://www.w3.org/1999/xhtml', 'body');
+body.setAttribute('id', 'abc');
+doc.documentElement.appendChild(body);
+alert(doc.getElementById('abc')); // [object HTMLBodyElement]
+</pre>
+
+<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', '#dom-domimplementation-createdocument', 'DOMImplementation.createDocument')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Modified the return type of <code>createDocument()</code> from {{domxref("Document")}} to {{domxref("XMLDocument")}}.<br>
+ The third argument of <code>createDocument()</code>, <em>doctype</em>, is now optional and default to <code>null</code>.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM3 Core', 'core.html#Level-2-Core-DOM-createDocument', 'DOMImplementation.createDocument')}}</td>
+ <td>{{Spec2('DOM3 Core')}}</td>
+ <td>No change from {{SpecName("DOM2 Core")}}</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 Core', 'core.html#Level-2-Core-DOM-createDocument', 'DOMImplementation.createDocument')}}</td>
+ <td>{{Spec2('DOM2 Core')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("api.DOMImplementation.createDocument")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>The {{domxref("DOMImplementation")}} interface it belongs to.</li>
+</ul>
diff --git a/files/pt-br/web/api/domimplementation/index.html b/files/pt-br/web/api/domimplementation/index.html
new file mode 100644
index 0000000000..e49ceda64a
--- /dev/null
+++ b/files/pt-br/web/api/domimplementation/index.html
@@ -0,0 +1,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>