MD typo in <!--BODY-->
When displayed on https://javascript.info/basic-dom-node-properties there was a typo that said <!–BODY–> but it was supposed to say <!--BODY-->. It was caused by a markdown technicality.
This commit is contained in:
parent
e40b8e7f72
commit
844aef693e
1 changed files with 1 additions and 1 deletions
|
@ -12,6 +12,6 @@ The answer: **`BODY`**.
|
||||||
|
|
||||||
What's going on step by step:
|
What's going on step by step:
|
||||||
|
|
||||||
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.
|
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.
|
||||||
2. The comment is now the only child node, so we get it in `body.firstChild`.
|
2. The comment is now the only child node, so we get it in `body.firstChild`.
|
||||||
3. The `data` property of the comment is its contents (inside `<!--...-->`): `"BODY"`.
|
3. The `data` property of the comment is its contents (inside `<!--...-->`): `"BODY"`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue