Get the text content of an element

Returns the raw text content of the ele element and its children. All the HTML tags are excluded.

const text = ele.textContent;

More

Previous
Get the first scrollable parent of an element
Next
Highlight an element when dragging a file over it