LS_Request Class Hierarchy

Load Stack

Repository has a getter method for each FileType. The getter method accesses the appropriate FileCache first to see if the file is already loaded. If not, a load context is created for the file and the request is forwarded to the Loader object.

Each getter returns an HTMLElement. In case of an error it returns an HTMLDivElement that contains information about the error.

File Types

There are five planned file types, corresponding to response types of the XMLHttpRequest function. Only the first two are currently implemented.

document
A file of type document is an XHTML or HTML file. Its element getter requires a URL that has an identifier (hash) to specify the requested element. Each requested element is processed by the Importer object. The Importer makes elements suitable for inclusion in the top-level web presentation document. It also processes relative URLs so that they are treated as relative to the file that contains the element.
text
A file of type text is any kind of file that contain text. Its element getter requires a URL but it should not have a hash. The element is processed by a text processor object such as HLJS or SHJS to produce a styled text element.
json, arraybuffer, and blob
Future types.