If this JavaScript code example installed on a web page, when users click on text-container HTML elements then it will select all of its inner text automatically.
At present, this JavaScript code made to work on elements such as input, textarea, div, span, td, and pre. You still can edit it to work more HTML elements as you want. That's so helpful for website with a lot of text.