typo fixes
This commit is contained in:
parent
7fccd9546e
commit
2a454aff13
3 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ DOM позволяет делать что угодно с HTML-элементо
|
|||
|
||||
Свойства `firstChild` и `lastChild` обеспечивают быстрый доступ к первому и последнему элементу.
|
||||
|
||||
Всегда верно:
|
||||
При наличии дочерних узлов всегда верно:
|
||||
```js
|
||||
elem.childNodes[0] === elem.firstChild
|
||||
elem.childNodes[elem.childNodes.length - 1] === elem.lastChild
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
var node = this;
|
||||
|
||||
while (node) {
|
||||
if (node.matches(selector)) return node;
|
||||
if (node.matches(css)) return node;
|
||||
else node = node.parentElement;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
if (document.documentElement.textContent === undefined) {
|
||||
|
||||
// определяем свойство
|
||||
Object.defineProperty(HtmlElement.prototype, "textContent", {
|
||||
Object.defineProperty(HTMLElement.prototype, "textContent", {
|
||||
get: function() {
|
||||
return this.innerText;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue