Skip to content

Commit

Permalink
pt-br: Format /web/api using Prettier (part 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
queengooborg committed Jul 28, 2023
1 parent 6cb0f57 commit f11661c
Show file tree
Hide file tree
Showing 100 changed files with 1,741 additions and 1,748 deletions.
8 changes: 3 additions & 5 deletions files/pt-br/web/api/document/head/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var aHead = document.head;

alert(aHead.id); // "my-document-head";

alert( document.head === document.querySelector("head") ); // true
alert(document.head === document.querySelector("head")); // true
```

## Notas
Expand All @@ -30,13 +30,11 @@ alert( document.head === document.querySelector("head") ); // true

## Especificações

| Especificação | Status | Comentário |
| ------------------------------------------------------------------------------------------------ | ---------------------------- | ----------------- |
| {{SpecName("HTML5 W3C", "dom.html#dom-tree-accessors", "document.head")}} | {{Spec2("HTML5 W3C")}} | Definição inicial |
{{Specifications}}

## Compatibilidade com navegadores

{{Compat("api.Document.head")}}
{{Compat}}

## Veja Também

Expand Down
16 changes: 10 additions & 6 deletions files/pt-br/web/api/document/images/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ var htmlCollection = document.images;
```js
var ilist = document.images;

for(var i = 0; i < ilist.length; i++) {
if(ilist[i].src == "banner.gif") {
// found the banner
}
for (var i = 0; i < ilist.length; i++) {
if (ilist[i].src == "banner.gif") {
// found the banner
}
}
```

Expand All @@ -33,6 +33,10 @@ for(var i = 0; i < ilist.length; i++) {

`document.images` é parte do DOM HTML, e só trabalho com documentos HTML.

## Especificação
## Especificações

- [DOM Level 2 HTML: HTMLDocument.images](https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-90379117)
{{Specifications}}

## Compatibilidade com navegadores

{{Compat}}
13 changes: 6 additions & 7 deletions files/pt-br/web/api/document/implementation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ DOMImpObj = document.implementation;
```js
var modName = "HTML";
var modVer = "2.0";
var conformTest = document.implementation.hasFeature( modName, modVer );
var conformTest = document.implementation.hasFeature(modName, modVer);

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

// alerts with: "DOM HTML 2.0 supported?: true" if DOM Level 2 HTML module is supported.
```
Expand All @@ -33,11 +33,10 @@ Uma lista dos nomes de módulos (ex., Core, HTML, XML, etc) está disponível na

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?](https://www.w3.org/2003/02/06-dom-support.html)). 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
## Especificações

- [DOM Level 2 Core: implementation](https://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-102161490)
- [DOM Level 3 Core: implementation](https://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490)
{{Specifications}}

## Notas específicas para o Gecko
## Compatibilidade com navegadores

- À partir do Gecko 19.0 o método {{domxref("DOMImplementation.hasFeature","hasFeature")}} irá sempre retornar _true_.
{{Compat}}
11 changes: 4 additions & 7 deletions files/pt-br/web/api/document/importnode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ Nodes from external documents should be cloned using [`document.importNode()`](/

Firefox doesn't currently enforce this rule (it did for a while during the development of Firefox 3, but too many sites break when this rule is enforced). We encourage Web developers to fix their code to follow this rule for improved future compatibility.

## Especificação
## Especificações

| Specification | Status | Comment |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ------------------ |
| {{SpecName("DOM WHATWG", "#dom-document-importnode", "document.importNode()")}} | {{Spec2("DOM WHATWG")}} | |
| {{SpecName("DOM2 Core", "core.html#Core-Document-importNode", "document.importNode()")}} | {{Spec2("DOM2 Core")}} | Initial definition |
{{Specifications}}

## Compatibilidade nos Browsers
## Compatibilidade com navegadores

{{Compat("api.Document.importNode")}}
{{Compat}}

## Veja também

Expand Down
7 changes: 2 additions & 5 deletions files/pt-br/web/api/document/location/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ dump(document.location);

## Especificações

| Especificação | Status | Comentário |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------- | ---------------------------------------------------- |
| {{SpecName('HTML WHATWG', "history.html#the-location-interface", "Document.location")}} | {{Spec2('HTML WHATWG')}} | Nenhuma mudança de {{SpecName("HTML5 W3C")}}. |
| {{SpecName('HTML5 W3C', "browsers.html#the-location-interface", "Document.location")}} | {{Spec2('HTML5 W3C')}} | Definição inicial. |
{{Specifications}}

## Compatibilidade com navegadores

{{Compat("api.Document.location")}}
{{Compat}}

## Veja também

Expand Down
18 changes: 9 additions & 9 deletions files/pt-br/web/api/document/readystatechange_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ O evento `readystatechange` é ativado quando o atributo [`readyState`](/pt-BR/d

## Propriedades

| Property | Type | Description |
| ------------------------------------- | ------------------------------------ | ------------------------------------------------------ |
| Property | Type | Description |
| ------------------------------- | -------------------------- | ------------------------------------------------------ |
| `target` {{readonlyInline}} | {{domxref("EventTarget")}} | The event target (the topmost target in the DOM tree). |
| `type` {{readonlyInline}} | {{domxref("DOMString")}} | The type of event. |
| `bubbles` {{readonlyInline}} | {{jsxref("Boolean")}} | Whether the event normally bubbles or not. |
| `cancelable` {{readonlyInline}} | {{jsxref("Boolean")}} | Whether the event is cancellable or not. |
| `type` {{readonlyInline}} | {{domxref("DOMString")}} | The type of event. |
| `bubbles` {{readonlyInline}} | {{jsxref("Boolean")}} | Whether the event normally bubbles or not. |
| `cancelable` {{readonlyInline}} | {{jsxref("Boolean")}} | Whether the event is cancellable or not. |

## Exemplo

```js
// alternativa ao DOMContentLoaded
document.onreadystatechange = function () {
if (document.readyState == "interactive") {
initApplication();
}
}
if (document.readyState == "interactive") {
initApplication();
}
};
```

## Compatibilidade com navegadores
Expand Down
10 changes: 7 additions & 3 deletions files/pt-br/web/api/document/url/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ A propriedade **`URL`** (usada apenas para leitura) da Interface {{domxref("Docu
## Síntaxe

```js
var url_atual = document.URL
var url_atual = document.URL;
```

## Documentação
## Especificações

- [DOM - Nível 2 - HTML: URL](https://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-46183437)
{{Specifications}}

## Compatibilidade com navegadores

{{Compat}}
41 changes: 18 additions & 23 deletions files/pt-br/web/api/document/write/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,21 @@ document.write(markup);

```html
<html>

<head>
<title>Escreva exemplo</title>

<script>
function newContent() {
document.open();
document.write("<h1>Sair com o velho - entrar com o novo!</h1>");
document.close();
}
</script>
</head>

<body onload="newContent();">
<p>Algum conteúdo do documento original.</p>
</body>

<head>
<title>Escreva exemplo</title>

<script>
function newContent() {
document.open();
document.write("<h1>Sair com o velho - entrar com o novo!</h1>");
document.close();
}
</script>
</head>

<body onload="newContent();">
<p>Algum conteúdo do documento original.</p>
</body>
</html>
```

Expand All @@ -54,7 +52,7 @@ Se chamar `document.write()` incorporada em uma tag HTML `<script>` embutida, en

```html
<script>
document.write("<h1>Título principal</h1>")
document.write("<h1>Título principal</h1>");
</script>
```

Expand All @@ -68,14 +66,11 @@ Se chamar `document.write()` incorporada em uma tag HTML `<script>` embutida, en
## Especificações

| Especificações | Status | Comentario |
| ------------------------------------------------------------------------------------------------ | -------------------------------- | ---------- |
| {{SpecName("HTML WHATWG", "#dom-document-write", "document.write(...)")}} | {{Spec2("HTML WHATWG")}} | |
| {{SpecName("DOM2 HTML", "html.html#ID-75233634", "document.write(...)")}} | {{Spec2("DOM2 HTML")}} | |
{{Specifications}}

## Compatibilidade com navegadores

{{Compat("api.Document.write")}}
{{Compat}}

## Veja também

Expand Down
Loading

0 comments on commit f11661c

Please sign in to comment.