Table of Contents

Interface IHtmlContentFetcher

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Contract for fetching remote HTML content and extracting the launcher's news fragment from it.

public interface IHtmlContentFetcher

Methods

FetchAndExtract(string, string, Action<HtmlNode>, Action<string>)

Asynchronously fetches HTML from a URL and extracts the element identified by divClass.

IEnumerator FetchAndExtract(string url, string divClass, Action<HtmlNode> onContentReady, Action<string> onError)

Parameters

url string

The URL from which to fetch HTML.

divClass string

The CSS class of the div element whose content should be extracted.

onContentReady Action<HtmlNode>

Callback invoked with the extracted node on success.

onError Action<string>

Callback invoked with an error message if fetching or parsing fails.

Returns

IEnumerator

An IEnumerator for use in a Unity Coroutine.

Remarks

Yields the parsed node rather than formatted text. Formatting is the active view's responsibility because the two launcher views share no common text format — TextMeshPro and UI Toolkit disagree on rich-text tag casing and alignment syntax, and UI Toolkit has no equivalent of TMP's <link> tag at all, so news links have to become real elements there. See SetNewsContent(HtmlNode).