Skip to content

Commit 9cf3a4f

Browse files
authored
Merge pull request #31 from berat/master
2.1.1 Çevirisi yapıldı
2 parents 2e1e5ad + 35ec9c1 commit 9cf3a4f

File tree

1 file changed

+65
-59
lines changed

1 file changed

+65
-59
lines changed
Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,117 @@
1-
# Browser environment, specs
1+
# Tarayıcı Ortamı, Özellikleri
22

3-
The JavaScript language was initially created for web browsers. Since then, it has evolved and become a language with many uses and platforms.
3+
Javascript dili başlangıçta internet tarayıcıları için oluşturuldu. O zamandan beri geliştirildi ve bir çok kullanımı ve platformu ile bir dil haline geldi.
44

5-
A platform may be a browser, or a web-server, or a washing machine, or another *host*. Each of them provides platform-specific functionality. The JavaScript specification calls that a *host environment*.
65

7-
A host environment provides platform-specific objects and functions additional to the language core. Web browsers give a means to control web pages. Node.js provides server-side features, and so on.
6+
Bir platform tarayıcı, bir web sunucusu, bir çamaşır makinesi veya başka bir sunucu olabilir. Bunların her biri platforma özgü fonksiyonlar sağlar. JavaScript özelliklerinde bunu bir sunucu ortamı olarak adlandırılır.
87

9-
Here's a bird's-eye view of what we have when JavaScript runs in a web-browser:
8+
Bir sunucu ortamı dil çekirdeğine ek olarak platforma özgü nesneler ve fonksiyonlar sağlar. İnternet tarayıcıları internet sayfalarını kontrol etmek için bir yol sunar. Node.js sunucu tarafı özellikleri vb.
109

11-
![](windowObjects.svg)
1210

13-
There's a "root" object called `window`. It has two roles:
11+
İşte javascriptin internet tarayıcısında çalıştığında elimizde ne olduğunu gösteren bir kuş bakışı.
1412

15-
1. First, it is a global object for JavaScript code, as described in the chapter <info:global-object>.
16-
2. Second, it represents the "browser window" and provides methods to control it.
13+
![](windowObjects.png)
1714

18-
For instance, here we use it as a global object:
15+
`window` denilen bir "kök" nesnesi var. İki rolü vardır.
16+
17+
1. Birincisi, Javascript kodu için evrensel bir nesnedir. bölümde açıklandığı gibi info:global-object
18+
2. İkincisi, "tarayıcı penceresini" temsil eder ve kontrol etmek için yöntemler sağlar.
19+
20+
Örneğin, burada `window`u evrensel bir nesne olarak kullandık.
1921

2022
```js run
21-
function sayHi() {
22-
alert("Hello");
23+
function selamSoyle() {
24+
alert("Selam");
2325
}
2426

25-
// global functions are accessible as properties of window
26-
window.sayHi();
27+
// evrensel değişkenler `window` özellikleri olarak erişilebilir.
28+
window.selamSoyle();
2729
```
2830

29-
And here we use it as a browser window, to see the window height:
31+
Ve burada `window`u pencerenin yüksekliğini görmek için tarayıcı penceresi olarak kullandık:
3032

3133
```js run
32-
alert(window.innerHeight); // inner window height
34+
alert(window.innerHeight); // İç pencere yüksekliği
3335
```
3436

35-
There are more window-specific methods and properties, we'll cover them later.
37+
Daha fazla `window`a özgü yöntemler ve özellikler var, bunlardan daha sonra bahsedeceğiz.
3638

37-
## DOM (Document Object Model)
39+
## Document Object Model (DOM) (Belge Nesneli Modeli)
3840

39-
The `document` object gives access to the page content. We can change or create anything on the page using it.
41+
`document` nesnesi sayfa içeriğine erişimi sağlar. Sayfada herhangi bir şeyi değiştirebilir ya da oluşturabiliriz.
4042

41-
For instance:
43+
Örneğin:
4244
```js run
43-
// change the background color to red
44-
document.body.style.background = "red";
45+
// arka plan rengini kırmızı olarak değiştirelim.
46+
document.body.style.background = 'red';
4547

46-
// change it back after 1 second
47-
setTimeout(() => document.body.style.background = "", 1000);
48+
// 1 saniye sonra tekrar değiştirelim
49+
setTimeout(() => document.body.style.background = '', 1000);
4850
```
4951

50-
Here we used `document.body.style`, but there's much, much more. Properties and methods are described in the specification:
52+
Burada `document.body.style` kullandık fakat daha fazla parametreler var. Özellikleri ve yöntemleri tanımlamada açıklanmıştır. Tesadüf ki, bunu geliştiren iki grup vardır.
53+
54+
DOM standartları : <https://dom.spec.whatwg.org>
55+
56+
Eskiden hiç bir standart yoktu. -- her tarayıcı her ne istiyorsa onu uyguladı. Bu yüzden farklı tarayıcıların aynı şeyler için farklı metotları ve özellikleri vardı. Geliştiriciler her bir tarayıcı için farklı kodlar yazmak zorunda kalıyordu. Karanlık dağınık zamanlar.
5157

52-
- **DOM Living Standard** at <https://dom.spec.whatwg.org>
58+
Şimdi bile bazen tarayıcılara özgü özellikleri kullanan ve uyumsuzluklar etrafında çalışan eski kodlarla çalışabiliriz ama bu derste modern şeyler kullanacağız: Onlara ihtiyacın olana kadar eski şeyler öğrenmeye gerek yok (şansın yüksek değil).
5359

54-
```smart header="DOM is not only for browsers"
55-
The DOM specification explains the structure of a document and provides objects to manipulate it. There are non-browser instruments that use it too.
60+
Daha sonra herkesi ortak noktada toplamak için DOM standartı belirlendi. İlk versiyon "DOM Level 1" idi, sonra DOM Level 2 tarafından genişletildi, sonra DOM Level 3 ve şimdi DOM Level 4. WhatWG grubundan insanlar sürümden sıkıldılar ve numara olmadan sadece DOM olarak adlandırdılar. Öyleyse biz yapacağız.
5661

57-
For instance, server-side tools that download HTML pages and process them use the DOM. They may support only a part of the specification though.
62+
```smart header="DOM yalnızca tarayıcı için değildir."
63+
DOM özelliği bir belgenin yapısını açıklar ve onu işlemek için nesne sağlar. Onu kullanan tarayıcı olmayan araçlarda var.
64+
65+
Örneğin, HTML sayfalarını indiren ve işleyen sunucu-taraflı araçlar. Ancak DOM özellikleri sadece bir bölümü destekleyebilir.
5866
```
5967

60-
```smart header="CSSOM for styling"
61-
CSS rules and stylesheets are not structured like HTML. There's a separate specification [CSSOM](https://www.w3.org/TR/cssom-1/) that explains how they are represented as objects, and how to read and write them.
68+
```smart header="Stil için CSSOM"
69+
CSS kuralları ve stil sayfaları HTML yapısına benzemez. Bu yüzden nesneler olarak nasıl temsil edildiklerini ve nasıl okunup yazılacağını açıklayan bir tanımlama vardır. [CSSOM](https://www.w3.org/TR/cssom-1/)
6270
63-
CSSOM is used together with DOM when we modify style rules for the document. In practice though, CSSOM is rarely required, because usually CSS rules are static. We rarely need to add/remove CSS rules from JavaScript, so we won't cover it right now.
71+
CSSOM, belgi için stil kurallarını değiştirdiğimizde DOM ile birlikte kullanılıyor. Pratikte olsa CSSOM nadiren gereklidir. Çünkü genelde CSS kuralları statiktir. Javascript'e CSS kuralları ekleme/çıkarma nadiren ihtiyacımız var. Bu yüzden onu kapatmayız.
6472
```
6573

66-
## BOM (Browser object model)
74+
## BOM (Tarayıcı Nesne Modeli)
6775

68-
Browser Object Model (BOM) are additional objects provided by the browser (host environment) to work with everything except the document.
76+
HTML'in bir parçası (BOM), belge dışında her şey ile çalışmak için tarayıcı (sunucu ortamı) tarafından sağlanan ek nesnelerdir.
6977

70-
For instance:
78+
Örneğin:
7179

72-
- The [navigator](mdn:api/Window/navigator) object provides background information about the browser and the operating system. There are many properties, but the two most widely known are: `navigator.userAgent` -- about the current browser, and `navigator.platform` -- about the platform (can help to differ between Windows/Linux/Mac etc).
73-
- The [location](mdn:api/Window/location) object allows us to read the current URL and can redirect the browser to a new one.
80+
- [navigator](mdn:api/Window/navigator) nesnesi tarayıcı ve işletim sistemi hakkında arkaplan bilgisi sağlar. Bir çok özelliği var, fakat en çok bilinen ikisi şunlardır: `navigator.userAgent` -- mevcut tarayıcı hakkında, ve `navigator.platform` -- platform hakkında (Windows/Linux/Mac arasında farklılık olacağından yardım gerekebilir).
81+
- [location](mdn:api/Window/location) nesnesi geçerli adresi okumayı ve tarayıcıyı yenisine yönlendirmeyi sağlar
7482

75-
Here's how we can use the `location` object:
83+
`location` nesnesini bu şekilde kullanabiliriz:
7684

7785
```js run
78-
alert(location.href); // shows current URL
79-
if (confirm("Go to wikipedia?")) {
80-
location.href = "https://wikipedia.org"; // redirect the browser to another URL
86+
alert(location.href); // Geçerli URL'yi gösterir
87+
if (confirm("wikipedia'ya git?")) {
88+
location.href = 'https://tr.wikipedia.org'; // Tarayıcı başka bir URL'ye yönlendirir.
8189
}
8290
```
8391

84-
Functions `alert/confirm/prompt` are also a part of BOM: they are directly not related to the document, but represent pure browser methods of communicating with the user.
85-
86-
BOM is the part of the general [HTML specification](https://html.spec.whatwg.org).
92+
`alert/confirm/prompt` fonksiyonları da BOM'un bir parçasıdır: Bunlar doğrudan belge ile ilgili değildir ancak kullanıcı ile tarayıcının saf iletişim kurmasını temsil eder.
8793

88-
Yes, you heard that right. The HTML spec at <https://html.spec.whatwg.org> is not only about the "HTML language" (tags, attributes), but also covers a bunch of objects, methods and browser-specific DOM extensions. That's "HTML in broad terms". Also, some parts have additional specs listed at <https://spec.whatwg.org>.
94+
```smart header="HTML specification"
95+
BOM genel kısmıdır[HTML specification](https://html.spec.whatwg.org).
8996
90-
## Summary
91-
92-
Talking about standards, we have:
97+
Evet, doğru duydun. <https://html.spec.whatwg.org>'deki HTML özelliği yalnızca "HTML dili" (etiketler, nitelikler) ile ilgili değil, aynı zamanda birçok nesne, yöntem ve tarayıca özgü DOM uzantılarını da kapsar. Bu "geniş anlamda HTML"dir.
98+
```
9399

94-
DOM specification
95-
: Describes the document structure, manipulations and events, see <https://dom.spec.whatwg.org>.
100+
## Özet
96101

97-
CSSOM specification
98-
: Describes stylesheets and style rules, manipulations with them and their binding to documents, see <https://www.w3.org/TR/cssom-1/>.
102+
Standar hakkında konuşurken:
99103

100-
HTML specification
101-
: Describes the HTML language (e.g. tags) and also the BOM (browser object model) -- various browser functions: `setTimeout`, `alert`, `location` and so on, see <https://html.spec.whatwg.org>. It takes the DOM specification and extends it with many additional properties and methods.
104+
DOM tanımlaması
105+
: belge yapısını, manipülasyonları, olayları açıklar, Bkz <https://dom.spec.whatwg.org>.
102106

103-
Additionally, some classes are described separately at <https://spec.whatwg.org/>.
107+
CSSOM tanımlaması
108+
: stil sayfaları ve stil kurallarını açıklar, bunlarla yapılan manipülasyonları ve belge bağlanmalarını sağlar, Bkz <https://www.w3.org/TR/cssom-1/>.
104109

105-
Please note these links, as there's so much stuff to learn it's impossible to cover and remember everything.
110+
HTML tanımlaması
111+
: HTML dilini (etiketler vs.) ve ayrıca BOM (tarayıcı nesne modeli) -- çeşitli tarayıcı fonksiyonlar: `setTimeout`, `alert`, `location` vb açıklar, Bkz <https://html.spec.whatwg.org>. DOM özelliğini alır ve bir çok ek özellik ve yöntemle geliştirir.
106112

107-
When you'd like to read about a property or a method, the Mozilla manual at <https://developer.mozilla.org/en-US/search> is also a nice resource, but the corresponding spec may be better: it's more complex and longer to read, but will make your fundamental knowledge sound and complete.
113+
Lütfen yukarıdaki bağlantıları kontrol edin. Çünkü öğrenecek bir çok şey var. Her şeyi hatırlamak imkansızdır.
108114

109-
To find something, it's often convenient to use an internet search "WHATWG [term]" or "MDN [term]", e.g <https://google.com?q=whatwg+localstorage>, <https://google.com?q=mdn+localstorage>.
115+
Bir özellik ve yöntem hakkında okumak istediğinizde -- Mozilla kılavuzu <https://developer.mozilla.org/en-US/search> güzel kılavuzlardan bir tanesidir, ancak ilgili özelliklerin okunması daha iyi olabilir: daha karmaşık ve okunması uzun fakat temel bilginiz eksiksiz ve sağlam hale gelecektir.
110116

111-
Now we'll get down to learning DOM, because the document plays the central role in the UI.
117+
Şimdi DOM öğrenmeye başlayacağız. Çünkü belge, kullanıcı arayüzünde önemli bir rol oynuyor, ayrıca onunla çalışmak en karmaşık kısımdır.

0 commit comments

Comments
 (0)