"use strict"; class BooksList extends AdventuresBooksList { constructor () { super({ contentsUrl: "data/books.json", fnSort: AdventuresBooksList._sortAdventuresBooks.bind(AdventuresBooksList), sortByInitial: "group", sortDirInitial: "asc", dataProp: "book", rootPage: "book.html", enhanceRowDataFn: (bk) => { bk._pubDate = new Date(bk.published || "1970-01-01"); }, rowBuilderFn: (bk) => { return ` ${AdventuresBooksList._getGroupStr(bk)} ${bk.name} ${AdventuresBooksList._getDateStr(bk)} `; }, }); } } const booksList = new BooksList(); window.addEventListener("load", () => booksList.pOnPageLoad()); function handleBrew (homebrew) { booksList.addData(homebrew); return Promise.resolve(); }