You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 2-ui/1-document/05-basic-dom-node-properties/3-tag-in-comment/solution.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,6 @@ The answer: **`BODY`**.
12
12
13
13
What's going on step by step:
14
14
15
-
1. The content of `<body>` is replaced with the comment. The comment is <code><!--BODY--></code>, because `body.tagName == "BODY"`. As we remember, `tagName` is always uppercase in HTML.
15
+
1. The content of `<body>` is replaced with the comment. The comment is `<!--BODY-->`, because `body.tagName == "BODY"`. As we remember, `tagName` is always uppercase in HTML.
16
16
2. The comment is now the only child node, so we get it in `body.firstChild`.
17
17
3. The `data` property of the comment is its contents (inside `<!--...-->`): `"BODY"`.
0 commit comments