public class DomHelper extends Object
Constructor and Description |
---|
DomHelper() |
Modifier and Type | Method and Description |
---|---|
static Element |
append(Element elem,
SafeHtml html)
Creates new DOM element(s) and appends them to el.
|
static Element |
insertAfter(Element elem,
SafeHtml html)
Creates new DOM element(s) and inserts them after el.
|
static Element |
insertBefore(Element elem,
SafeHtml html)
Creates new DOM element(s) and inserts them before el.
|
static Element |
insertFirst(Element elem,
SafeHtml html)
Creates new DOM element(s) and inserts them as the first child of el.
|
static Element |
insertHtml(String where,
Element el,
SafeHtml html)
Inserts an HTML fragment into the DOM.
|
static Element |
overwrite(Element elem,
SafeHtml html)
Creates new DOM element(s) and overwrites the contents of el with them.
|
public static Element append(Element elem, SafeHtml html)
elem
- the context elementhtml
- the htmlpublic static Element insertAfter(Element elem, SafeHtml html)
elem
- the context elementhtml
- rthe htmlpublic static Element insertBefore(Element elem, SafeHtml html)
elem
- the context elementhtml
- the htmlpublic static Element insertFirst(Element elem, SafeHtml html)
elem
- the context elementhtml
- the htmlpublic static Element insertHtml(String where, Element el, SafeHtml html)
where
- where to insert the html in relation to el - beforeBegin,
afterBegin, beforeEnd, afterEnd.el
- the context elementhtml
- the htmlpublic static Element overwrite(Element elem, SafeHtml html)
elem
- the context elementhtml
- the htmlCopyright © 2018. All rights reserved.