From 2a454aff13a1d32f1ebf7bef6e9829c9f141eef8 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 4 May 2015 10:05:36 +0300 Subject: [PATCH] typo fixes --- 2-ui/1-document/4-traversing-dom/article.md | 2 +- 2-ui/1-document/8-dom-polyfill/2-polyfill-closest/solution.md | 2 +- .../8-dom-polyfill/3-polyfill-textcontent-ie8/solution.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2-ui/1-document/4-traversing-dom/article.md b/2-ui/1-document/4-traversing-dom/article.md index 9e234f2f..13ef881a 100644 --- a/2-ui/1-document/4-traversing-dom/article.md +++ b/2-ui/1-document/4-traversing-dom/article.md @@ -114,7 +114,7 @@ DOM позволяет делать что угодно с HTML-элементо Свойства `firstChild` и `lastChild` обеспечивают быстрый доступ к первому и последнему элементу. -Всегда верно: +При наличии дочерних узлов всегда верно: ```js elem.childNodes[0] === elem.firstChild elem.childNodes[elem.childNodes.length - 1] === elem.lastChild diff --git a/2-ui/1-document/8-dom-polyfill/2-polyfill-closest/solution.md b/2-ui/1-document/8-dom-polyfill/2-polyfill-closest/solution.md index 9d81e229..96eb0543 100644 --- a/2-ui/1-document/8-dom-polyfill/2-polyfill-closest/solution.md +++ b/2-ui/1-document/8-dom-polyfill/2-polyfill-closest/solution.md @@ -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; diff --git a/2-ui/1-document/8-dom-polyfill/3-polyfill-textcontent-ie8/solution.md b/2-ui/1-document/8-dom-polyfill/3-polyfill-textcontent-ie8/solution.md index 2bfa57c4..3ed97c04 100644 --- a/2-ui/1-document/8-dom-polyfill/3-polyfill-textcontent-ie8/solution.md +++ b/2-ui/1-document/8-dom-polyfill/3-polyfill-textcontent-ie8/solution.md @@ -7,7 +7,7 @@ if (document.documentElement.textContent === undefined) { // определяем свойство - Object.defineProperty(HtmlElement.prototype, "textContent", { + Object.defineProperty(HTMLElement.prototype, "textContent", { get: function() { return this.innerText; },