From aa4e42f07f49fe993534044135a2bc4d00efd318 Mon Sep 17 00:00:00 2001 From: Saiful Date: Tue, 2 Feb 2021 10:54:59 +0600 Subject: [PATCH 1/2] translate dom navigation --- 2-ui/1-document/03-dom-navigation/article.md | 194 +++++++++---------- 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/2-ui/1-document/03-dom-navigation/article.md b/2-ui/1-document/03-dom-navigation/article.md index f7123d70d..cf75357dd 100644 --- a/2-ui/1-document/03-dom-navigation/article.md +++ b/2-ui/1-document/03-dom-navigation/article.md @@ -5,37 +5,37 @@ libs: --- -# Walking the DOM +# DOM এ নেভিগেশন -The DOM allows us to do anything with elements and their contents, but first we need to reach the corresponding DOM object. +DOM আমাদের সকল এলিমেন্ট এবং তাদের কন্টেন্ট কে পরিবর্তন, পরিমার্জন করতে দেয়,কিন্তু প্রথমে আমাদের DOM অবজেক্ট টির কাছে পৌঁছাতে হবে। -All operations on the DOM start with the `document` object. That's the main "entry point" to DOM. From it we can access any node. +DOM এর সকল অপারেশন `document` অবজেক্ট এর মাধ্যমে করতে হয়। এটিই DOM এর "entry point"। এর সাহায্যে আমরা যেকোন নোড অ্যাক্সেস করতে পারি। -Here's a picture of links that allow for travel between DOM nodes: +এখানে দেখুন কিভাবে আমরা DOM নোডে ট্রাভার্স করতে পারি: ![](dom-links.svg) -Let's discuss them in more detail. +চলুন এ সম্পর্কে আরো বিস্তারিত জানি। -## On top: documentElement and body +## শুরুতে: documentElement এবং body -The topmost tree nodes are available directly as `document` properties: +ট্রি নোডের একদম উপরের নোড সমূহ সরাসরি `document` এর প্রপার্টি হিসেবে থাকে: `` = `document.documentElement` -: The topmost document node is `document.documentElement`. That's the DOM node of the `` tag. +: একদম উপরের নোডটি হল `document.documentElement`। এটি দ্বারা `` ট্যাগকে নির্দেশিত করে। `` = `document.body` -: Another widely used DOM node is the `` element -- `document.body`. +: আরেকটি বহুল ব্যবহৃত নোড হল `` এলিম্যান্ট -- `document.body`. `` = `document.head` -: The `` tag is available as `document.head`. +: `` ট্যাগকে `document.head` এর মাধ্যমে অ্যাক্সেস করতে পারি। -````warn header="There's a catch: `document.body` can be `null`" -A script cannot access an element that doesn't exist at the moment of running. +````warn header="`document.body` এর একটি ইরোর এটি `null` হতে পারে" +স্ক্রিপ্ট যেসব এলিমেন্ট থাকে না তাদের অ্যাক্সেস করতে পারে না। -In particular, if a script is inside ``, then `document.body` is unavailable, because the browser did not read it yet. +যেমন, যদি `` এ স্ক্রিপ্ট ট্যাগের সাহায্যে আমাদের `document.body` কে অ্যাক্সেস করতে চাওয়া, কেননা ব্রাউজার আদৌ `body` ট্যাগ রেন্ডার করে না। -So, in the example below the first `alert` shows `null`: +সুতরাং, নিচের উদাহরণে `alert` এর মান হবে `null`: ```html run @@ -43,7 +43,7 @@ So, in the example below the first `alert` shows `null`: @@ -51,7 +51,7 @@ So, in the example below the first `alert` shows `null`: @@ -59,18 +59,18 @@ So, in the example below the first `alert` shows `null`: ``` ```` -```smart header="In the DOM world `null` means \"doesn't exist\"" -In the DOM, the `null` value means "doesn't exist" or "no such node". +```smart header="DOM এ `null` বলতে বুঝায় \"DOM এ এর অস্তিত্ব নেই\"" +DOM এ `null` বলতে বুঝায় \"DOM এ এর অস্তিত্ব নেই\" অথবা "এমন কোন নোড নেই"। ``` ## Children: childNodes, firstChild, lastChild -There are two terms that we'll use from now on: +এদের দুই ধরণের টার্ম আছে যা আমরা এখন দেখব: -- **Child nodes (or children)** -- elements that are direct children. In other words, they are nested exactly in the given one. For instance, `` and `` are children of `` element. -- **Descendants** -- all elements that are nested in the given one, including children, their children and so on. +- **Child nodes (or children)** -- যা কোন এলিমেন্টের সরাসরি চাইল্ড এলিমেন্ট। অন্যথায় বলা যায়, অন্য একটির নেস্টেড হিসেবে থাকবে। যেমন, `` এবং `` হল `` এর চাইল্ড এলিমেন্ট। +- **Descendants** -- সকল এলিমেন্ট, যারা একটার মধ্যে একটা তারমধ্যে আরেকটা এভাবে থাকে। -For instance, here `` has children `
` and `