Element.addChild

Family of convenience functions to quickly add a tag with some text or other relevant info (for example, it's a src for an <img> element instead of inner text). They forward to Element.make then calls appendChild.

div.addChild("span", "hello there");
div.addChild("div", Html("<p>children of the div</p>"));
  1. Element addChild(string tagName, string childInfo, string childInfo2)
  2. Element addChild(Element e)
  3. Element addChild(string tagName, Element firstChild, string info2)
  4. Element addChild(string tagName, Html innerHtml, string info2)
    class Element
    addChild
    (
    string tagName
    ,,
    string info2 = null
    )
    out (ret) { assert (ret !is null); assert ((cast(DocumentFragment)this !is null) || (ret.parentNode is this), ret.toString); assert (ret.parentDocument is this.parentDocument); }

Meta