Home Manual Reference Source
import DOMReplace from 'ievv_jsbase/lib/dom/DOMReplace'
public class | source

DOMReplace

Direct Subclass:

DOMReplaceFromUrl

DOM replacer that is mainly intended for DOM replace where some other components may need to know about the change to the DOM.

All the methods send out a signal via SignalHandlerSingleton when they make changes to the DOM.

Constructor Summary

Public Constructor
public

constructor(elementId: string)

Member Summary

Public Members
public

The DOM element.

public

The element DOM ID.

Method Summary

Public Methods
public

appendInnerHtml(htmlString: string)

Append innerHTML to the element.

public

prependInnerHtml(htmlString: string)

Prepend innerHTML to the element.

public

replaceInnerHtml(htmlString: string)

Replace innerHTML of the element.

Public Constructors

public constructor(elementId: string) source

Params:

NameTypeAttributeDescription
elementId string

The ID of the element to replace.

Public Members

public element: Element source

The DOM element.

public elementId: string source

The element DOM ID.

Public Methods

public appendInnerHtml(htmlString: string) source

Append innerHTML to the element.

Sends a signal named ievv_jsbase.DOMReplace.appendInnerHtml when the append is done. The signal is send with this object as the data.

Params:

NameTypeAttributeDescription
htmlString string

The HTML to append to the innerHTML of the element.

public prependInnerHtml(htmlString: string) source

Prepend innerHTML to the element.

Sends a signal named ievv_jsbase.DOMReplace.prependInnerHtml when the prepend is done. The signal is send with this object as the data.

Params:

NameTypeAttributeDescription
htmlString string

The HTML to prepend to the innerHTML of the element.

public replaceInnerHtml(htmlString: string) source

Replace innerHTML of the element.

Sends a signal named ievv_jsbase.DOMReplace.replaceInnerHtml when the replace is done. The signal is send with this object as the data.

Params:

NameTypeAttributeDescription
htmlString string

The HTML to set as innerHTML of the element.