[help] Wait for request to finish before start parsing
I am trying to use Paged.JS to make a list of items, which I fetch the data using JS XMLHttpRequest and then parse it to a table to be added into the document. However since XMLHttpRequest is async, putting the call in beforePreview(content)
did not work and Paged.JS will parse the document without any data. Is there anyway to make Paged.JS to wait until XMLHttpRequest/fetch to callback before starting to parse the HTML document?