From 1f3b7cdffa2ca2ccc8856aa5c23b3309a150f438 Mon Sep 17 00:00:00 2001 From: Brent Guffens Date: Mon, 5 Feb 2018 16:55:51 +0100 Subject: [PATCH 1/4] Small readability and language improvements --- .../05-basic-dom-node-properties/article.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/2-ui/1-document/05-basic-dom-node-properties/article.md b/2-ui/1-document/05-basic-dom-node-properties/article.md index 2783c3a8..9520fce6 100644 --- a/2-ui/1-document/05-basic-dom-node-properties/article.md +++ b/2-ui/1-document/05-basic-dom-node-properties/article.md @@ -78,7 +78,7 @@ Try it on `document.body`. ``` ````smart header="IDL in the spec" -In the specification classes are described using not JavaScript, but a special [Interface description language](https://en.wikipedia.org/wiki/Interface_description_language) (IDL), that is usually easy to understand. +In the specification, classes are described not using JavaScript, but a special [Interface description language](https://en.wikipedia.org/wiki/Interface_description_language) (IDL), that is usually easy to understand. In IDL all properties are prepended with their types. For instance, `DOMString`, `boolean` and so on. @@ -165,11 +165,11 @@ Sure, the difference is reflected in their names, but is indeed a bit subtle. - The `tagName` property exists only for `Element` nodes. - The `nodeName` is defined for any `Node`: - for elements it means the same as `tagName`. - - for other node types (text, comment etc) it has a string with the node type. + - for other node types (text, comment, etc.) it has a string with the node type. In other words, `tagName` is only supported by element nodes (as it originates from `Element` class), while `nodeName` can say something about other node types. -For instance let's compare `tagName` and `nodeName` for the `document` and a comment node: +For instance, let's compare `tagName` and `nodeName` for the `document` and a comment node: ```html run @@ -177,7 +177,7 @@ For instance let's compare `tagName` and `nodeName` for the `document` and a com