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

DOMReplaceFromUrl

Extends:

DOMReplace → DOMReplaceFromUrl

Extends DOMReplace adn change the methods to replace by making a request to the server.

Method Summary

Public Methods
public

Append to the innerHTML of the element with data from a GET request to an URL.

public
public

Prepend to the innerHTML of the element with data from a GET request to an URL.

public

Replace innerHTML of the element with data from a GET request to an URL.

Inherited Summary

From class DOMReplace
public

The DOM element.

public

The element DOM ID.

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 Methods

public appendInnerHtml(url: string): Promise source

Append to the innerHTML of the element with data from a GET request to an URL.

The actual append of the innerHTML is done using DOMReplace#appendInnerHtml.

Override:

DOMReplace#appendInnerHtml

Params:

NameTypeAttributeDescription
url string

The URL to get the HTML from.

Return:

Promise

A promise. The resolve callback is called with the html string as first argument and the HttpResponse as the second argument. The reject callback is called with one argument - the HttpResponse.

public extractHtmlStringFromResponse(response: *): * source

Params:

NameTypeAttributeDescription
response *

Return:

*

public prependInnerHtml(url: string): Promise source

Prepend to the innerHTML of the element with data from a GET request to an URL.

The actual prepend of the innerHTML is done using DOMReplace#prependInnerHtml.

Override:

DOMReplace#prependInnerHtml

Params:

NameTypeAttributeDescription
url string

The URL to get the HTML from.

Return:

Promise

A promise. The resolve callback is called with the html string as first argument and the HttpResponse as the second argument. The reject callback is called with one argument - the HttpResponse.

public replaceInnerHtml(url: string): Promise source

Replace innerHTML of the element with data from a GET request to an URL.

The actual replace of the innerHTML is done using DOMReplace#replaceInnerHtml.

Override:

DOMReplace#replaceInnerHtml

Params:

NameTypeAttributeDescription
url string

The URL to get the HTML from.

Return:

Promise

A promise. The resolve callback is called with the html string as first argument and the HttpResponse as the second argument. The reject callback is called with one argument - the HttpResponse.