Home Reference Source
public class | source

Html

Extends:

react~React.Component → Html

Компонент встаквки html-кода

Example:

<Html id="HtmlWidget"
      url="/test.html"/>

React Props:

NameTypeAttributeDescription
url string url html, который будет вставляться
id string id виджета
html string html строка

Static Method Summary

Static Public Methods
public static

getDerivedStateFromProps(nextProps: *, prevState: *): {"html": *}

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

state: {"html": *, "loading": *}

Method Summary

Public Methods
public

Вызывает handleResponse, обработка реджекта и резолва

public

fetch(): *

public
public

Фетчинг, если ошибка, то вызывает sendAlert

public

render(): *

Базовый рендер

public

Отправляет сообщение об ошибке

Static Public Methods

public static getDerivedStateFromProps(nextProps: *, prevState: *): {"html": *} source

Params:

NameTypeAttributeDescription
nextProps *
prevState *

Return:

{"html": *}

Public Constructors

public constructor() source

Public Members

public state: {"html": *, "loading": *} source

Public Methods

public componentDidMount() source

Вызывает handleResponse, обработка реджекта и резолва

public fetch(): * source

Return:

*

public getData() source

public handleResponse(): * source

Фетчинг, если ошибка, то вызывает sendAlert

Return:

*

(Promise) - возвращает промис с html

public render(): * source

Базовый рендер

Return:

*

public sendAlert() source

Отправляет сообщение об ошибке