Skip to content

Commit 749195a

Browse files
Merge pull request #183 from yy34/patch-7
Walking the DOM
2 parents 70a20cd + 7bdff5e commit 749195a

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

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

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,39 @@ libs:
55
---
66

77

8-
# Walking the DOM
8+
# Dom'da gezinme
99

10-
The DOM allows us to do anything with elements and their contents, but first we need to reach the corresponding DOM object.
10+
DOM, elementler ve içerikleri ile her şeyi yapmamıza izin verir, ancak önce ilgili DOM nesnesine ulaşmamız gerekir.
1111

12-
All operations on the DOM start with the `document` object. From it we can access any node.
12+
DOM üzerindeki tüm işlemler `document` nesnesiyle başlar. Bu nesneden herhangi bir düğüme erişebiliriz.
1313

14-
Here's a picture of links that allow for travel between DOM nodes:
14+
DOM düğümleri arasında dolaşmaya izin veren bağlantıların bir görüntüsü:
1515

1616
![](dom-links.svg)
1717

18-
Let's discuss them in more detail.
18+
Bunlara daha ayrıntılı değinelim.
1919

20-
## On top: documentElement and body
20+
## Üstte: documentElement ve body
2121

22-
The topmost tree nodes are available directly as `document` properties:
22+
En üstteki ağaç düğümleri doğrudan `document` özellikleri olarak kullanılabilir:
2323

2424
`<html>` = `document.documentElement`
25-
: The topmost document node is `document.documentElement`. That's DOM node of `<html>` tag.
25+
: En üstteki belge düğümü `document.documentElement`'tir. Bu, `<html>` etiketinin DOM düğümüdür.
2626

2727
`<body>` = `document.body`
28-
: Another widely used DOM node is the `<body>` element -- `document.body`.
28+
: Yaygın olarak kullanılan başka bir DOM düğümü, `<body>` elementidir -- `document.body`.
2929

3030
`<head>` = `document.head`
31-
: The `<head>` tag is available as `document.head`.
31+
: `<head>` etiketi `document.head` olarak mevcuttur.
3232

33-
````warn header="There's a catch: `document.body` can be `null`"
34-
A script cannot access an element that doesn't exist at the moment of running.
3533

36-
In particular, if a script is inside `<head>`, then `document.body` is unavailable, because the browser did not read it yet.
3734

38-
So, in the example below the first `alert` shows `null`:
35+
````warn header="Bir yakalama var: `document.body`, `null` olabilir."
36+
Bir komut dosyası (script), çalışma anında mevcut olmayan bir öğeye erişemez.
37+
38+
Özellikle, bir komut dosyası `<head>` içindeyse, tarayıcı henüz okumadığı için `document.body` kullanılamaz.
39+
40+
Bu nedenle, aşağıdaki örnekte ilk `alert` `null` gösterir:
3941

4042
```html run
4143
<html>

0 commit comments

Comments
 (0)