DOMReplaceFromUrl
Extends:
Direct Subclass:
Extends DOMReplace adn change the methods to replace by making a request to the server.
Method Summary
| Public Methods | ||
| public |
appendInnerHtml(url: string): Promise Append to the innerHTML of the element with data from a GET request to an URL. |
|
| public |
extractHtmlStringFromResponse(response: *): * |
|
| public |
prependInnerHtml(url: string): Promise Prepend to the innerHTML of the element with data from a GET request to an URL. |
|
| public |
replaceInnerHtml(url: string): Promise 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#appendInnerHtmlParams:
| Name | Type | Attribute | Description |
| 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:
| Name | Type | Attribute | Description |
| 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#prependInnerHtmlParams:
| Name | Type | Attribute | Description |
| 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#replaceInnerHtmlParams:
| Name | Type | Attribute | Description |
| 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. |