From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../web/api/document/implementation/index.html | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 files/pt-br/web/api/document/implementation/index.html (limited to 'files/pt-br/web/api/document/implementation/index.html') 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 +--- +
{{ ApiRef("DOM") }}
+ +
 
+ +

Sumário

+ +

Retorna um objeto {{domxref("DOMImplementation")}} associado ao documento atual.

+ +

Sintaxe

+ +
DOMImpObj = document.implementation;
+
+ +

Exemplo

+ +
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.
+
+ +

Uma lista dos nomes de módulos (ex., Core, HTML, XML, etc) está disponível na DOM Level 2 Conformance Section

+ +

Notas

+ +

A Recomendação do W3C DOM Level 1 apenas especifica o método hasFeature, que é o único meio de verificar se o módulo DOM é suportado pelo navegador (veja exemplo acima e What does your user agent claim to support?). Quando disponível, outros métodos DOMImplementation proverão serviços para controlar coisas fora deste único documento. Por exemplo, a interface DOMImplementation inclui um método createDocumentType com o qual DTD's podem ser criados para um ou mais documentos gerenciados pela implementação.

+ +

Especificação

+ + + +

Notas específicas para o Gecko

+ + -- cgit v1.2.3-54-g00ecf