Searching: getElement*, querySelector*#278
Searching: getElement*, querySelector*#278mahdiHash merged 37 commits intojavascript-tutorial:masterfrom
Conversation
|
Please make the requested changes. After it, add a comment "/done". |
/done |
alivarastepour
left a comment
There was a problem hiding this comment.
Hello again,
First of all, thanks for your contribution and time devoted to this project;
As you have probably guessed, using markdown with two languages which have different directions is a bit challenging; so we kindly ask you to follow the steps mentioned in this repo to bring a local server up and see your changes as they are made to each individual markdown.
all changes should maintain the readability of document; currently, that is not the case with your changes.
Thanks again
|
Please make the requested changes. After it, add a comment "/done". |
Checking the translation with the server repo isn't that necessary. You can read the article on github since it'll keep the RTL format of Persian (although in some cases it's overridden, but it's ok overall). |
alivarastepour
left a comment
There was a problem hiding this comment.
Hi @shahrzadJavadiKoushesh , i have proposed some changes to improve your translation even further. please review them.
| ## querySelectorAll [#querySelectorAll] | ||
|
|
||
| By far, the most versatile method, `elem.querySelectorAll(css)` returns all elements inside `elem` matching the given CSS selector. | ||
| تا اینجا، همهکارهترین روش `elem.querySelectorAll(css)` بود که تمام elementهای درون `elem` که با css selector داده شده تطابق دارند را انتخاب میکند. |
There was a problem hiding this comment.
| تا اینجا، همهکارهترین روش `elem.querySelectorAll(css)` بود که تمام elementهای درون `elem` که با css selector داده شده تطابق دارند را انتخاب میکند. | |
| با اختلاف، جامعترین روش جستجو، `elem.querySelectorAll(css)` است که تمام elementهای درون `elem` که با css selector داده شده تطابق دارند را انتخاب میکند. |
There was a problem hiding this comment.
| تا اینجا، همهکارهترین روش `elem.querySelectorAll(css)` بود که تمام elementهای درون `elem` که با css selector داده شده تطابق دارند را انتخاب میکند. | |
| تا اینجا، جامعترین روش جستجو `elem.querySelectorAll(css)` بود که تمام elementهای درون `elem` که با css selector داده شده تطابق دارند را انتخاب میکند. |
"By far" translation is correct.
| The method comes in handy when we are iterating over elements (like in an array or something) and trying to filter out those that interest us. | ||
| این روش زمانی به کار میآید که میخواهیم روی elementهایی (مثل آرایه یا همچین چیزی) iterate کنیم و آنهایی که مطلوب هستند را فیلتر کنیم. | ||
|
|
||
| For instance: |
There was a problem hiding this comment.
| For instance: | |
| برای مثال: |
| همچنین روشهای دیگری برای جستجو برای یک node با tag، class و ... وجود دارد. | ||
|
|
||
| Today, they are mostly history, as `querySelector` is more powerful and shorter to write. | ||
| امروزه آنها بیشتر تاریخچه هستند چون `querySelector` قدرتمندتر است و برای نوشتن سریعتر است. |
There was a problem hiding this comment.
| امروزه آنها بیشتر تاریخچه هستند چون `querySelector` قدرتمندتر است و برای نوشتن سریعتر است. | |
| امروزه آنها کمتر استفاده میشوند چون `querySelector` قدرتمندتر است و برای نوشتن سریعتر است. |
| </table> | ||
|
|
||
| By far the most used are `querySelector` and `querySelectorAll`, but `getElement(s)By*` can be sporadically helpful or found in the old scripts. | ||
| .های قدیمی یافت شود script هم گاهی به صورت پراکنده میتواند مفید باشد یا در `getElement(s)By` شده است، اما `querySelectorAll` و `querySelector` تا اینجا بیشترین استفاده از |
There was a problem hiding this comment.
| .های قدیمی یافت شود script هم گاهی به صورت پراکنده میتواند مفید باشد یا در `getElement(s)By` شده است، اما `querySelectorAll` و `querySelector` تا اینجا بیشترین استفاده از | |
| .های قدیمی یافت شود script هم گاهی به صورت پراکنده میتواند مفید باشد یا در `getElement(s)By` شده است، اما `querySelectorAll` و `querySelector` با اختلاف بیشترین استفاده از |
There was a problem hiding this comment.
The translation is ok, but aren't the words disordered?
It's not a code comment, so if you've changed the order of translation, please turn it back.
| And let's mention one more method here to check for the child-parent relationship, as it's sometimes useful: | ||
| - `elemA.contains(elemB)` returns true if `elemB` is inside `elemA` (a descendant of `elemA`) or when `elemA==elemB`. | ||
| و بیایید اینجا یک روش دیگر برای بررسی رابطه والد و فرزند را چک کنیم،چون بعضی وقتها مفید است: | ||
| .را برمیگرداند true مثدار `elemA.contains(elemB)` باشد، عبارت `elemA==elemB` یا وقتی که (`elemA` از فرزندان) باشد `elemA` داخل `elemB` اگر - |
There was a problem hiding this comment.
| .را برمیگرداند true مثدار `elemA.contains(elemB)` باشد، عبارت `elemA==elemB` یا وقتی که (`elemA` از فرزندان) باشد `elemA` داخل `elemB` اگر - | |
| .را برمیگرداند true مقدار `elemA.contains(elemB)` باشد، عبارت `elemA==elemB` یا وقتی که (`elemA` از فرزندان) باشد `elemA` داخل `elemB` اگر - |
|
|
||
| ```warn header="Please don't use id-named global variables to access elements" | ||
| This behavior is described [in the specification](https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object), but it is supported mainly for compatibility. | ||
| ```warn header=".ها استفاده نکنیدelement برای دسترسی به global لفطا از متغیرهای" |
There was a problem hiding this comment.
| ```warn header=".ها استفاده نکنیدelement برای دسترسی به global لفطا از متغیرهای" | |
| ```warn header=".ها استفاده نکنیدelement برای دسترسی به global لطفا از متغیرهای" |
| اینجا document مربوط به table و form را میبینیم. | ||
|
|
||
| How to find?... | ||
| چگونه پیدا کنیم؟ |
There was a problem hiding this comment.
| چگونه پیدا کنیم؟ | |
| چگونه ... را پیدا کنیم؟ |
There was a problem hiding this comment.
| چگونه پیدا کنیم؟ | |
| چگونه موارد زیر را پیدا کنیم؟ |
The ellipsis refers to the follow-up lines.
|
Please make the requested changes. After it, add a comment "/done". |
|
Thanks for the review, @alivarastepour :D |
|
/done |
|
Thanks for your contribution, @shahrzadJavadiKoushesh :D |
|
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
No description provided.