Skip to content

Commit d0a9ba4

Browse files
committed
Siblings and the parent translated
1 parent b17d4bf commit d0a9ba4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

2-ui/1-document/03-dom-navigation/article.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,30 +180,30 @@ Por favor, não! O loop `for..in` itera sobre todas as propriedades enumeráveis
180180
</body>
181181
````
182182

183-
## Siblings and the parent
183+
## Irmãos e pais
184184

185-
*Siblings* are nodes that are children of the same parent. For instance, `<head>` and `<body>` are siblings:
185+
*Irmãos* são nós filhos do mesmo pai. Por exemplo, `<head>` e `<body>` são irmãos:
186186

187-
- `<body>` is said to be the "next" or "right" sibling of `<head>`,
188-
- `<head>` is said to be the "previous" or "left" sibling of `<body>`.
187+
- É dito que `<body>` é o irmão "próximo" ou "à direita" de `<head>`,
188+
- É dito que `<head>` é o irmão "anterior" ou "à esquerda" de `<body>`.
189189

190-
The parent is available as `parentNode`.
190+
O pai está acessível como `parentNode`.
191191

192-
The next node in the same parent (next sibling) is `nextSibling`, and the previous one is `previousSibling`.
192+
O próximo nó (próximo irmão) no mesmo pai é `nextSibling`, e o anterior é `previousSibling`.
193193

194-
For instance:
194+
Por exemplo:
195195

196196
```html run
197197
<html><head></head><body><script>
198-
// HTML is "dense" to evade extra "blank" text nodes.
198+
// O HTML é "burro" para evitar nós de textos "em branco".
199199
200-
// parent of <body> is <html>
200+
// o pai de <body> é <html>
201201
alert( document.body.parentNode === document.documentElement ); // true
202202
203-
// after <head> goes <body>
203+
// depois de <head> vem <body>
204204
alert( document.head.nextSibling ); // HTMLBodyElement
205205
206-
// before <body> goes <head>
206+
// antes de <head> vem <body>
207207
alert( document.body.previousSibling ); // HTMLHeadElement
208208
</script></body></html>
209209
```

0 commit comments

Comments
 (0)