diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:52 -0500 |
commit | 074785cea106179cb3305637055ab0a009ca74f2 (patch) | |
tree | e6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/pt-br/web/api/document/implementation | |
parent | da78a9e329e272dedb2400b79a3bdeebff387d47 (diff) | |
download | translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2 translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip |
initial commit
Diffstat (limited to 'files/pt-br/web/api/document/implementation')
-rw-r--r-- | files/pt-br/web/api/document/implementation/index.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/files/pt-br/web/api/document/implementation/index.html b/files/pt-br/web/api/document/implementation/index.html new file mode 100644 index 0000000000..2f7b5ca992 --- /dev/null +++ b/files/pt-br/web/api/document/implementation/index.html @@ -0,0 +1,52 @@ +--- +title: Document.implementation +slug: Web/API/Document/implementation +tags: + - API + - DOM + - Propriedade + - Referencia +translation_of: Web/API/Document/implementation +--- +<div>{{ ApiRef("DOM") }}</div> + +<div> </div> + +<h2 id="Sumário">Sumário</h2> + +<p>Retorna um objeto {{domxref("DOMImplementation")}} associado ao documento atual.</p> + +<h2 id="Sintaxe">Sintaxe</h2> + +<pre class="syntaxbox"><var>DOMImpObj</var> = document.implementation; +</pre> + +<h2 id="Exemplo">Exemplo</h2> + +<pre class="brush: js">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>Uma lista dos nomes de módulos (ex., Core, HTML, XML, etc) está disponível na DOM Level 2 <a href="http://www.w3.org/TR/DOM-Level-2-Core/introduction.html#ID-Conformance-h2">Conformance Section</a></p> + +<h2 id="Notas">Notas</h2> + +<p>A Recomendação do W3C DOM Level 1 apenas especifica o método <code>hasFeature</code>, que é o único meio de verificar se o módulo DOM é suportado pelo navegador (veja exemplo acima e <a href="http://www.w3.org/2003/02/06-dom-support.html">What does your user agent claim to support?</a>). Quando disponível, outros métodos <code>DOMImplementation</code> proverão serviços para controlar coisas fora deste único documento. Por exemplo, a interface <code>DOMImplementation</code> inclui um método <code>createDocumentType</code> com o qual DTD's podem ser criados para um ou mais documentos gerenciados pela implementação.</p> + +<h2 id="Especificação">Especificação</h2> + +<ul> + <li><a href="http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490">DOM Level 2 Core: implementation</a></li> + <li><a href="http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490">DOM Level 3 Core: implementation</a></li> +</ul> + +<h2 id="Notas_específicas_para_o_Gecko">Notas específicas para o Gecko</h2> + +<ul> + <li>À partir do Gecko 19.0 {{geckoRelease("19.0")}} o método {{domxref("DOMImplementation.hasFeature","hasFeature")}} irá sempre retornar <em>true</em>.</li> +</ul> |