From 21cfb547f9dae03b32ee9704a677aafb2c3f1916 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Sun, 8 Nov 2020 13:30:01 +0530 Subject: [PATCH] element-properties - Clarify desc for .innerText --- docs/element-properties.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/element-properties.mdx b/docs/element-properties.mdx index 476731b..1762383 100644 --- a/docs/element-properties.mdx +++ b/docs/element-properties.mdx @@ -236,10 +236,9 @@ traverse(root.firstChild) `Element.innerText: string [= value]` -Returns the element's **text content "as rendered"**. +Returns the **text content** of the element and its descendants **"as rendered"**. -Can be set, to **replace the element's children** with the given string. -It adds a *text node* for the normal text ranges, but replaces line breaks with `
` elements. +Can be set, to **replace the element's children** with the given string. It creates a *text node* for every normal text range, but replaces each line break with a `
` element. **Example 1 -**