DocumentLoader

Type: Class

How to get documentLoader?

JavaScript

import documentLoader from 'fontoxml-remote-documents/src/documentLoader.js'

The DocumentLoader manages and de-duplicates load requests for documents and adds corresponding instances of DocumentController to the DocumentsManager.

Documents can be referred to either by their documentId or by an URL relative to some other document. In the latter case, resolving occurs in the CMS, but we can deduplicate requests by checking the documentId returned from such requests.

Methods

loadDocument

Type: Function

Request the document with the given ID to be loaded

Arguments

Returns

loadRelatedDocument

Type: Function

Request the document referred to by the given URL and referrer document ID to be loaded

Arguments

Returns