You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick draft for the new API (based on hooks and events )
consteventHandlers={OnLoading: ()=>{/* do something */}}<Villainsrc={'my_archive.cbz'}options={...}events={EventHandlers}><MyCustomImageRender/>// Or use default UI<VillainUIoptions={theme: 'dark', ...more}/></Villain>
Also added a better way for tracking the progress from loading the archive to extraction of images.
based on the HtmlMediaElement.readystate property. It can be used instead of custom listener for events.
This should be added to the docs as well:
exportconstREADY_STATE={// There is no archive or source to loadNOTHING: 0,// Fetching archive from the webLOADING_ARCHIVE: 1,// Find all data to unpackREADING_ARCHIVE: 2,// Unpack images and create pagesUNPACKING_ARCHIVE: 3,// All pages where createdREADY: 4,// An error ocurred, the `error` property on the global store will contain more infoERROR: 5,}
Tracking progress for next version:
readyState
tracking )If you have more ideas or features that you will like to see for the next version leave a comment below.
The text was updated successfully, but these errors were encountered: