#34 Add DocumentHandler and AssetLoader interfaces

Open
opened 6 months ago by ncc1988 · 0 comments
ncc1988 commented 6 months ago
Owner

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.

TODO:

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. TODO: - [ ] 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 - [ ] PlaintextDocumentHandler - [ ] HTMLDocumentHandler - [ ] GopherMenuDocumentHandler - [ ] XMLDocumentHandler
ncc1988 added this to the Version 0.0.2 milestone 6 months ago
ncc1988 added the
enhancement
label 6 months ago
ncc1988 added the
TODO
label 6 months ago
ncc1988 self-assigned this 6 months ago
Sign in to join this conversation.
Loading…
There is no content yet.