Open jccr opened 8 years ago
Good idea. Especially as reader.once()
is so easy to mistake withreader.on()
, and very convenient for accessing the spineItem
reference directly too.
CONTENT_DOCUMENT_READY
sounds good to me.
List of existing (related) events: https://github.com/readium/readium-shared-js/blob/develop/js/globals.js#L62
PAGINATION_CHANGED
CONTENT_DOCUMENT_LOAD_START
CONTENT_DOCUMENT_LOADED
I am OK with merging it after we push 0.23
Use case: Adding highlights or accessing reader API functions only once per spine item, only when view instance is fully loaded and paginated.
This can be done with the current event model like this:
It would be nice if this could be officially supported as an event with a name like: CONTENT_DOCUMENT_READY
or SPINE_ITEM_LOADED or PAGINATION_FINISHED, etc