FB3DataProvider - Litres/FB3Reader GitHub Wiki
The top-level logic of working with data is described in FB3DOM section, FB3DataProvider
works on "physical" level. It takes URL and returns parsed JSON data. Module includes ready-to-use class AJAXDataProvider, based on for web-browser XMLHttpRequest
mechanic. Consumer may create it's own implementation, relaying on native IO of the OS, for example.
Defined in DataProvider/FB3DataProviderHead.ts file
Interface | Definition | Quick description |
---|---|---|
IJsonLoaderFactory |
export interface IJsonLoaderFactory {
Request(URL: string,
Callback: IJSonLoadedCallback,
Progressor: FB3ReaderSite.ILoadProgress,
CustomData?: any);
} |
Abstract JSON data provider |
IJSonLoadedCallback |
export interface IJSonLoadedCallback {
(Data: any, CustomData?: any): void;
} |
Describes signature for "JSON ready" callback function |
Defined in DataProvider/FB3AjaxDataProvider.ts file
Class | Implements | Quick description |
---|---|---|
AJAXDataProvider | IJsonLoaderFactory | Access data with window.XMLHttpRequest |
AjaxLoader | None | Internal data access realization |