Element.directText

Sets the direct text, without modifying other child nodes.

More...
  1. string directText [@property getter]
  2. string directText [@property setter]
    class Element
    @property
    void
    directText
    (
    string text
    )

Detailed Description

Unlike innerText, this does *not* remove existing elements in the element.

It only replaces the first text node it sees.

If there are no text nodes, it calls appendText.

So, given <div><img />text here</div>, it will keep the <img />, and replace the text here.

Meta