custom-element
demo
DOM merge. DCE dynamic update with focus preservation.
Hello world!
Word count: {string-length(//slice/text-container/text())}
Character count:
{string-length(//slice/txt)}
Word count:
{string-length(normalize-space(//slice/txt)) - string-length(translate(normalize-space(//slice/txt), ' ', '')) + 1}
txt
slice:
{//slice/txt}