fetch Content Location From Href
Fetches a ContentLocation for hrefs like chapter02.xhtml#title-4.
If href is a relative URL, you can specify a baseUrl to from where href is relative to. If you don't specify a baseUrl it will default to the root of the EPUB.
For example: To resolve a relative href link found in a ReaderDocument, you should pass the URL of that ReaderDocument as baseUrl:
readerPublication.fetchContentLocationFromHref(href, readerDocument.sourceContentDocument.contentUrl, {...}, {...})onError is called if:
hrefdoes not resolve to aReaderDocumentin this publication.a "#hash" is specified in
hrefand does not match any element id in the document.
Fetches a ContentLocation for hrefs like chapter02.xhtml#title-4.
If href is a relative URL, you can specify a baseUrl to from where href is relative to. If you don't specify a baseUrl it will default to the root of the EPUB.
For example: To resolve a relative href link found in a ReaderDocument, you should pass the URL of that ReaderDocument as baseUrl:
readerPublication.fetchContentLocationFromHref(href, readerDocument.sourceContentDocument.contentUrl)The returned ColibrioResult is an error if:
hrefdoes not resolve to aReaderDocumentin this publication.a "#hash" is specified in
hrefand does not match any element id in the document.