Add DocumentHandler and AssetLoader interfaces
The DocumentHandler interface defines methods for classes that process parsed documents and style them in an appropriate way. Implementations must have access to the engine instance via the AssetLoader interface to request the loading of assets while processing the document. For each document type there shall be one DocumentHandler implementation, but one implementation may handle several document types.
- Define the DocumentHandler interface and its methods.
- setAssetBehavior: Sets the behavior for the handler: Whether it shall wait for all assets to be loaded before styling the document or whether to start styling it right away and then restyling it after some assets have been loaded.
- getAssetBehavior: Returns the asset behavior that has been set.
- setDocument: Sets the document (as DOM).
- processDocument: Analyses the document (check for assets to load) and styles it.
- applyAsset: Applies an asset to the document. The asset can be a stylesheet, a picture, another media type and later (maybe) a script. The asset that is applied is identified by an URI/URL.
- getStyledDocument: Returns the styled document.
- Define the AssetLoader interface and its methods.
- requestAsset: Requests an asset to be loaded. The asset is specified by an URI/URL.
- Make MoeNavigatorEngine an implementation of that interface.
- Write implementations of the DocumentHandler interface
Deleting a branch is permanent. It CANNOT be undone. Continue?