From 5e0d35cd69b5cf416325ace8e605ceca77e9113f Mon Sep 17 00:00:00 2001 From: bendtherules Date: Sat, 31 Oct 2020 10:12:05 +0530 Subject: [PATCH] element-properties - Add MDN badge for first 3 parts --- docs/element-properties.mdx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/element-properties.mdx b/docs/element-properties.mdx index d39898f..cbc5bd5 100644 --- a/docs/element-properties.mdx +++ b/docs/element-properties.mdx @@ -25,10 +25,14 @@ ele.tagName // "IMG" Text nodes are not element, so they don't have any tagName. To identify the type of node, use `.nodeType` - which returns `3` (same as `Node.TEXT_NODE`) for text nodes. - - ::: + +   + +   + + ## Children @@ -95,6 +99,8 @@ for (let i = 0; i < children.length; i++) { ``` + + ### 2. .childNodes `Element.childNodes: NodeList` @@ -121,6 +127,7 @@ childNodes // NodeList [text, span, text] }) ``` +