- Notifications
You must be signed in to change notification settings - Fork179
DOM navigation#328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
DOM navigation#328
Changes fromall commits
Commits
Show all changes
13 commits Select commitHold shift + click to select a range
d1bfa37
1-js/09-classes/06-instanceof: Translation
dolgachiof976080
Merge branch 'master' of github.com:javascript-tutorial/uk.javascript…
dolgachiofba8269
1-js/10-error-handling/2-custom-errors: Translation
dolgachio26021bc
Merge branch 'javascript-tutorial:master' into master
dolgachiof20ee14
Translate 2-ui titles
dolgachiocf87d7f
Apply suggestions from code review
tarasyyyk7758d34
Merge branch 'javascript-tutorial:master' into master
dolgachioe407870
2-ui/1-document/03-dom-navigation: part 1
dolgachiof1c2506
2-ui/1-document/03-dom-navigation: part 2
dolgachioced6139
2-ui/1-document/03-dom-navigation: tasks
dolgachio6ed9194
Merge branch 'master' of github.com:stas-dolgachov/uk.javascript.info
dolgachio539e8a1
2-ui/1-document/03-dom-navigation: 4-task translation
dolgachiob1f74dc
Apply suggestions from code review
tarasyyykFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
16 changes: 8 additions & 8 deletions2-ui/1-document/03-dom-navigation/1-dom-children/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
Існує багато способів, наприклад: | ||
До DOM вузла`<div>`: | ||
```js | ||
document.body.firstElementChild | ||
//або | ||
document.body.children[0] | ||
//або (перший вузол -- це пробіл, тому беремо 2-й) | ||
document.body.childNodes[1] | ||
``` | ||
До DOM вузла`<ul>`: | ||
```js | ||
document.body.lastElementChild | ||
//або | ||
document.body.children[1] | ||
``` | ||
До другого `<li>` (Петро): | ||
```js | ||
//отримати <ul>,а потім отримати його останній дочірній елемент | ||
document.body.lastElementChild.lastElementChild | ||
``` |
18 changes: 9 additions & 9 deletions2-ui/1-document/03-dom-navigation/1-dom-children/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
1.Так, це правда. Елемент`elem.lastChild`завжди останній, у нього немає `nextSibling`. | ||
2.Ні, це неправда, тому що`elem.children[0]`— перший дочірній *серед елементів*.Але перед ним можуть існувати вузли інших типів. Отже, `previousSibling`може бути, наприклад, текстовим вузлом. | ||
Зверніть увагу: в обох випадках якщо немає дітей, то буде помилка. | ||
Якщо дочірніх елементів немає, `elem.lastChild`матиме значення`null`,тому ми не зможемо отримати доступ до`elem.lastChild.nextSibling`.А колекція`elem.children`порожня (як порожній масив `[]`). |
8 changes: 4 additions & 4 deletions2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Ми будемо використовувати властивості`rows`та `cells`для доступу до діагональних клітинок таблиці. |
10 changes: 5 additions & 5 deletions2-ui/1-document/03-dom-navigation/4-select-diagonal-cells/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.