Open way5 opened 2 months ago
A section is a full document. "Section" in Epub.js is a name for what is technically called a content document or a spine item. It's also commonly though somewhat inaccurately called a chapter.
Right. It is clear to me what section is. However, the HTML which I am expecting to be section, in above example is the root page html. I mean the root page where the reader container element is, not the section/chapter.
Ah, I see...
Well, section.render()
(without any arguments) only works if the section has a full URL, which is only the case when opening unarchived books (otherwise it will try to request the path within the archive as if it is a valid URL). So for archived books, you need to specify the request method:
section.render(book.load.bind(book)).the(html => { /* ... */ })
Hi everyone! I was implementing renderless example of the following content:
The problem I am facing is that HTML which is being returned after render is actually the whole document. As I understand the above example is the only way to get section source generated.
Where am I mistaken?