UNPKG

@ima/core

Version:

IMA.js framework for isomorphic javascript application

38 lines (37 loc) 1.23 kB
export class PageHandler { /** * Initializes the page handler. */ init() { return; } /** * Called before a PageManager starts to transition from previous page to * a new one. * * @param managedPage The currently managed page - soon-to-be * previously managed page. * @param nextManagedPage The data of the page that's about to * be managed. * @param action An action object describing what triggered the routing. */ handlePreManagedState(managedPage, nextManagedPage, action) { return; } /** * Called after a PageManager finishes transition from previous page to * a new one. * * @param managedPage The currently managed page. * @param previousManagedPage The data of the page that was * previously managed. * @param action An action object describing what triggered the routing. */ handlePostManagedState(managedPage, previousManagedPage, action) { return; } /** * Finalization callback, called when the page manager is being discarded. * This usually happens when the page is hot-reloaded at the client side. */ destroy() { return; } } //# sourceMappingURL=PageHandler.js.map